Lines Matching defs:nsamples
163 "floating-point matrix (CvMat) of 'nsamples' x 'nclusters' size" );
175 "floating-point matrix (CvMat) of 'nsamples' x 'dims' size" );
317 int i, nsamples, nclusters, dims;
328 nsamples = train_data.count;
333 labels->cols != 1 && labels->rows != 1 || labels->cols + labels->rows - 1 != nsamples ))
337 if( nsamples <= nclusters )
342 CV_CALL( probs = cvCreateMat( nsamples, nclusters, CV_64FC1 ));
372 for( i = 0; i < nsamples; i++ )
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 )
412 for( i = 0; i < nsamples; i++ )
494 int nclusters = params.nclusters, nsamples = train_data.count, dims = train_data.dims;
497 if( nclusters == nsamples )
501 for( i = 0; i < nsamples; i++ )
519 CV_CALL( labels = cvCreateMat( 1, nsamples, CV_32SC1 ));
528 class_ranges->data.i[1] = nsamples;
560 weights->data.db[i] = (double)cluster_size/(double)nsamples;
585 int i, j, k, nsamples, dims;
591 nsamples = train_data.count;
593 nclusters = MIN( nclusters, nsamples );
606 for( i = 0; i < nsamples; i++ )
607 labels->data.i[i] = i*nclusters/nsamples;
617 for( i = 0; i < nsamples; i++ )
663 for( i = 0; i < nsamples; i++ )
705 i = cvRandInt( &rng ) % nsamples;
733 for( i = 0; i < nsamples; i++ )
741 i = cvRandInt(&rng) % nsamples;
789 int nsamples = train_data.count, dims = train_data.dims, nclusters = params.nclusters;
792 double likelihood_bias = -CV_LOG2PI * (double)nsamples * (double)dims / 2., _log_likelihood = -DBL_MAX;
851 CV_CALL( samples = cvCreateMat( nsamples, dims, CV_64FC1 ));
856 for( i = 0; i < nsamples; i++ )
926 for( i = 0; i < nsamples; i++ )
956 for( i = 0, _log_likelihood = likelihood_bias; i < nsamples; i++ )
999 for( i = 0; i < nsamples; i++ )
1035 cvConvertScale( weights, weights, 1./(double)nsamples, 0 );