Lines Matching defs:bestLabels
242 Mat bestLabels;
244 kmeans( data, 3, bestLabels, TermCriteria( TermCriteria::COUNT, iters, 0.0), 0, KMEANS_PP_CENTERS, noArray() );
245 if( !calcErr( bestLabels, labels, sizes, err , false ) )
257 kmeans( data, 3, bestLabels, TermCriteria( TermCriteria::COUNT, iters, 0.0), 0, KMEANS_RANDOM_CENTERS, noArray() );
258 if( !calcErr( bestLabels, labels, sizes, err, false ) )
270 labels.copyTo( bestLabels );
273 bestLabels.at<int>( rng.next() % pointsCount, 0 ) = rng.next() % 3;
274 kmeans( data, 3, bestLabels, TermCriteria( TermCriteria::COUNT, iters, 0.0), 0, KMEANS_USE_INITIAL_LABELS, noArray() );
275 if( !calcErr( bestLabels, labels, sizes, err, false ) )
311 Mat testData( pointsCount, 2, CV_32FC1 ), testLabels, bestLabels;
319 knearest->findNearest(testData, 4, bestLabels);
321 if( !calcErr( bestLabels, testLabels, sizes, err, true ) )
336 knearestKdt->findNearest(testData, 4, bestLabels);
337 if( !calcErr( bestLabels, testLabels, sizes, err, true ) )