Lines Matching refs:nclusters
55 int nclusters; member in cv::ml::EMImpl
63 nclusters = val; in CV_IMPL_PROPERTY_S()
64 CV_Assert(nclusters > 1); in CV_IMPL_PROPERTY_S()
69 return nclusters; in getClustersNumber()
87 nclusters = DEFAULT_NCLUSTERS; in EMImpl()
172 _outputs.create(samples.rows, nclusters, ptype); in predict()
208 _probs.create(1, nclusters, ptype); in predict2()
236 int nclusters, int covMatType, const Mat* probs, const Mat* means, in checkTrainData() argument
247 CV_Assert(nclusters > 0); in checkTrainData()
248 CV_Assert(nclusters <= nsamples); in checkTrainData()
258 probs->rows == nsamples && probs->cols == nclusters && in checkTrainData()
263 … (weights->cols == 1 || weights->rows == 1) && static_cast<int>(weights->total()) == nclusters && in checkTrainData()
268 means->rows == nclusters && means->cols == dim && in checkTrainData()
273 static_cast<int>(covs->size()) == nclusters)); in checkTrainData()
328 checkTrainData(startStep, samples, nclusters, covMatType, probs0, means0, covs0, weights0); in setTrainData()
356 covs.resize(nclusters); in setTrainData()
365 covsEigenValues.resize(nclusters); in decomposeCovs()
367 covsRotateMats.resize(nclusters); in decomposeCovs()
368 invCovsEigenValues.resize(nclusters); in decomposeCovs()
369 for(int clusterIndex = 0; clusterIndex < nclusters; clusterIndex++) in decomposeCovs()
415 kmeans(trainSamplesFlt, nclusters, labels, in clusterTrainSamples()
430 weights = Mat(1, nclusters, CV_64FC1, Scalar(0)); in clusterTrainSamples()
431 covs.resize(nclusters); in clusterTrainSamples()
432 for(int clusterIndex = 0; clusterIndex < nclusters; clusterIndex++) in clusterTrainSamples()
461 logWeightDivDet.create(1, nclusters, CV_64FC1); in computeLogWeightDivDet()
464 for(int clusterIndex = 0; clusterIndex < nclusters; clusterIndex++) in computeLogWeightDivDet()
528 covs.resize(nclusters); in doTrain()
529 for(int clusterIndex = 0; clusterIndex < nclusters; clusterIndex++) in doTrain()
572 Mat L(1, nclusters, CV_64FC1), centeredSample(1, dim, CV_64F); in computeProbabilities()
574 for(int clusterIndex = 0; clusterIndex < nclusters; clusterIndex++) in computeProbabilities()
630 trainProbs.create(trainSamples.rows, nclusters, CV_64FC1); in eStep()
658 means.create(nclusters, dim, CV_64FC1); in mStep()
664 for(int clusterIndex = 0; clusterIndex < nclusters; clusterIndex++) in mStep()
682 covs.resize(nclusters); in mStep()
683 covsEigenValues.resize(nclusters); in mStep()
685 covsRotateMats.resize(nclusters); in mStep()
686 invCovsEigenValues.resize(nclusters); in mStep()
687 for(int clusterIndex = 0; clusterIndex < nclusters; clusterIndex++) in mStep()
742 for(int clusterIndex = 0; clusterIndex < nclusters; clusterIndex++) in mStep()
762 fs << "nclusters" << nclusters; in write_params()
788 nclusters = (int)fn["nclusters"]; in read_params()