Lines Matching refs:dims
173 m->cols != train_data.dims ) in set_params()
197 cov->rows != cov->cols || cov->cols != train_data.dims ) in set_params()
219 int i, k, dims; in predict() local
226 dims = means->cols; in predict()
229 CV_CALL( cvPreparePredictData( _sample, dims, 0, params.nclusters, _probs, &sample_data )); in predict()
232 size = sizeof(double) * (nclusters + dims); in predict()
241 diff = cvMat( 1, dims, CV_64FC1, (double*)buffer + nclusters ); in predict()
254 for( i = 0; i < dims; i++ ) in predict()
262 for( i = 0; i < dims; i++ ) in predict()
266 for( i = 0; i < dims; i++ ) in predict()
317 int i, nsamples, nclusters, dims; in train() local
324 &train_data.count, &train_data.dims, &train_data.dims, in train()
330 dims = train_data.dims; in train()
343 CV_CALL( means = cvCreateMat( nclusters, dims, CV_64FC1 )); in train()
346 params.cov_mat_type == COV_MAT_SPHERICAL ? 1 : dims, CV_64FC1 )); in train()
352 CV_CALL( covs[i] = cvCreateMat( dims, dims, CV_64FC1 )); in train()
353 CV_CALL( cov_rotate_mats[i] = cvCreateMat( dims, dims, CV_64FC1 )); in train()
368 CvMat sample = cvMat( 1, dims, CV_32F ); in train()
406 int nclusters = params.nclusters, nsamples = train_data.count, dims = train_data.dims; in init_em() local
448 CV_CALL( tcov = cvCreateMat( dims, dims, CV_64FC1 )); in init_em()
449 CV_CALL( w = cvCreateMat( dims, dims, CV_64FC1 )); in init_em()
451 CV_CALL( u = cvCreateMat( dims, dims, CV_64FC1 )); in init_em()
464 cvSetIdentity( covs[i], cvScalar(cvTrace(w).val[0]/dims) ); in init_em()
494 int nclusters = params.nclusters, nsamples = train_data.count, dims = train_data.dims; in init_auto() local
499 CvMat src = cvMat( 1, dims, CV_32F ); in init_auto()
500 CvMat dst = cvMat( 1, dims, CV_64F ); in init_auto()
538 hdr[0] = cvMat( 1, dims, CV_32F ); in init_auto()
585 int i, j, k, nsamples, dims; in kmeans() local
592 dims = train_data.dims; in kmeans()
595 CV_CALL( centers = cvCreateMat( nclusters, dims, CV_64FC1 )); in kmeans()
596 CV_CALL( old_centers = cvCreateMat( nclusters, dims, CV_64FC1 )); in kmeans()
628 for( j = 0; j <= dims - 4; j += 4 ) in kmeans()
638 for( ; j < dims; j++ ) in kmeans()
669 for( j = 0; j <= dims - 4; j += 4 ) in kmeans()
683 for( ; j < dims; j++ ) in kmeans()
697 for( j = 0; j < dims; j++ ) in kmeans()
710 for( j = 0; j < dims; j++ ) in kmeans()
718 for( j = 0; j < dims; j++ ) in kmeans()
789 int nsamples = train_data.count, dims = train_data.dims, nclusters = params.nclusters; in run_em() local
791 double min_det_value = MAX( DBL_MIN, pow( min_variation, dims )); in run_em()
792 …double likelihood_bias = -CV_LOG2PI * (double)nsamples * (double)dims / 2., _log_likelihood = -DBL… in run_em()
809 d = cvTrace(*covs).val[0]/dims; in run_em()
812 log_weight = pow( d, dims*0.5 ); in run_em()
824 for( j = 0, det = 1.; j < dims; j++ ) in run_em()
848 CV_CALL( covs_item = cvCreateMat( dims, dims, CV_64FC1 )); in run_em()
849 CV_CALL( centered_sample = cvCreateMat( 1, dims, CV_64FC1 )); in run_em()
851 CV_CALL( samples = cvCreateMat( nsamples, dims, CV_64FC1 )); in run_em()
861 for( j = 0; j < dims; j++ ) in run_em()
877 for( j = 0, det = 1.; j < dims; j++ ) in run_em()
890 d = cvTrace(covs[k]).val[0]/(double)dims; in run_em()
905 cvScale( log_det, log_det, dims ); in run_em()
931 for( j = 0; j < dims; j++ ) in run_em()
935 for( j = 0; j < dims; j++ ) in run_em()
1010 for( j = 0; j < dims; j++ ) in run_em()
1019 d = w_data[0]/(double)dims; in run_em()
1029 for( j = 0, det = 1.; j < dims; j++ ) in run_em()
1040 cvScale( log_det, log_det, dims ); in run_em()