Home | History | Annotate | Download | only in src

Lines Matching refs:params

47  * params.nclusters    - number of clusters to cluster samples to.
79 CvEMParams params, CvMat* labels )
85 train(samples, sample_idx, params, labels);
106 for( i = 0; i < params.nclusters; i++ )
127 params = _params;
128 params.term_crit = cvCheckTermCriteria( params.term_crit, 1e-6, 10000 );
130 if( params.cov_mat_type != COV_MAT_SPHERICAL &&
131 params.cov_mat_type != COV_MAT_DIAGONAL &&
132 params.cov_mat_type != COV_MAT_GENERIC )
135 switch( params.start_step )
138 if( !params.probs )
142 if( !params.means )
151 if( params.nclusters < 1 )
154 if( params.probs )
156 const CvMat* p = params.weights;
161 p->cols != params.nclusters )
166 if( params.means )
168 const CvMat* m = params.means;
172 m->rows != params.nclusters ||
178 if( params.weights )
180 const CvMat* w = params.weights;
185 w->rows + w->cols - 1 != params.nclusters )
190 if( params.covs )
191 for( k = 0; k < params.nclusters; k++ )
193 const CvMat* cov = params.covs[k];
221 int cov_mat_type = params.cov_mat_type;
227 nclusters = params.nclusters;
229 CV_CALL( cvPreparePredictData( _sample, dims, 0, params.nclusters, _probs, &sample_data ));
329 nclusters = params.nclusters;
346 params.cov_mat_type == COV_MAT_SPHERICAL ? 1 : dims, CV_64FC1 ));
406 int nclusters = params.nclusters, nsamples = train_data.count, dims = train_data.dims;
408 if( params.start_step == START_AUTO_STEP || nclusters == 1 || nclusters == nsamples )
410 else if( params.start_step == START_M_STEP )
415 cvGetRow( params.probs, &prob, i );
428 CV_ASSERT( params.start_step == START_E_STEP && params.means );
429 if( params.weights && params.covs )
431 cvConvert( params.means, means );
432 cvReshape( weights, weights, 1, params.weights->rows );
433 cvConvert( params.weights, weights );
441 CV_CALL( cvConvert( params.covs[i], covs[i] ));
450 if( params.cov_mat_type == COV_MAT_GENERIC )
463 if( params.cov_mat_type == COV_MAT_SPHERICAL )
465 else if( params.cov_mat_type == COV_MAT_DIAGONAL )
494 int nclusters = params.nclusters, nsamples = train_data.count, dims = train_data.dims;
521 params.means ? 1 : 10, 0.5 ), params.means );
789 int nsamples = train_data.count, dims = train_data.dims, nclusters = params.nclusters;
793 int start_step = params.start_step;
807 if( params.cov_mat_type == COV_MAT_SPHERICAL )
818 if( params.cov_mat_type == COV_MAT_GENERIC )
835 if( params.cov_mat_type == COV_MAT_GENERIC )
837 else if( params.cov_mat_type == COV_MAT_DIAGONAL )
839 else if( params.cov_mat_type == COV_MAT_SPHERICAL )
908 for( n = 0; n < params.term_crit.max_iter; n++ )
971 if( fabs( (_log_likelihood - prev_log_likelihood) / prev_log_likelihood ) < params.term_crit.epsilon )
1087 return params.nclusters;