コード例 #1
0
static void rotate()
{
	glm::mat4 x_model(1.0f), y_model(1.0f), z_model(1.0f);

	if(x_dir!=0)
	{
		x_deg = 0.1*x_dir;
	}
	else
		x_deg = 0;
	if(y_dir!=0)
	{
		y_deg = 0.1*y_dir;
	}
	else
		y_deg = 0;
	if(z_dir!=0)
	{
		z_deg = 0.1*z_dir;
	}
	else
		z_deg = 0;

	if(x_dir!=0 || y_deg!=0 || z_deg!=0)
	{
		x_model = glm::rotate(x_model, x_deg, glm::vec3(1,0,0));
		y_model = glm::rotate(y_model, y_deg, glm::vec3(0,1,0));
		z_model = glm::rotate(z_model, z_deg, glm::vec3(0,0,1));

		camera_location = camera_location * x_model * y_model * z_model;
		up_direction = up_direction * x_model * y_model * z_model;
	}
}
コード例 #2
0
void rank_repo(GBDT * g){
    double train_auc = auc(y_rowns(g), y_model(g), y_label(g));
    fprintf(stderr, "current tree size : %4d, train_auc : %.8f", t_size(g), train_auc);
    if (has_test(g) == 1){
        double test_auc  = auc(t_rowns(g), t_model(g), t_label(g));
        fprintf(stderr, " test_auc : %.8f", test_auc);
    }
    fprintf(stderr, "\n");
}
コード例 #3
0
ファイル: gblr.c プロジェクト: elvinxiao/dml
void lr_repo(GBDT * g){
    double train_auc = auc(y_rowns(g), y_model(g), y_label(g));
    printf("current tree size : %4d, train_auc : %.3f", t_size(g), train_auc);
    if (has_test(g) == 1){
        double test_auc  = auc(t_rowns(g), t_model(g), t_label(g));
        printf(" test_auc : %.3f", test_auc);
    }
    printf("\n");
}