Lines Matching refs:sample_idx
630 cvPreprocessOrderedResponses( const CvMat* responses, const CvMat* sample_idx, int sample_all ) in cvPreprocessOrderedResponses() argument
659 if( r_type == CV_32FC1 && CV_IS_MAT_CONT(responses->type) && !sample_idx ) in cvPreprocessOrderedResponses()
665 if( sample_idx ) in cvPreprocessOrderedResponses()
667 if( !CV_IS_MAT(sample_idx) || CV_MAT_TYPE(sample_idx->type) != CV_32SC1 || in cvPreprocessOrderedResponses()
668 sample_idx->rows != 1 && sample_idx->cols != 1 || !CV_IS_MAT_CONT(sample_idx->type) ) in cvPreprocessOrderedResponses()
670 if( sample_idx->rows + sample_idx->cols - 1 > sample_count ) in cvPreprocessOrderedResponses()
672 map = sample_idx->data.i; in cvPreprocessOrderedResponses()
673 sample_count = sample_idx->rows + sample_idx->cols - 1; in cvPreprocessOrderedResponses()
707 const CvMat* sample_idx, int sample_all, in cvPreprocessCategoricalResponses() argument
749 if( sample_idx ) in cvPreprocessCategoricalResponses()
751 if( !CV_IS_MAT(sample_idx) || CV_MAT_TYPE(sample_idx->type) != CV_32SC1 || in cvPreprocessCategoricalResponses()
752 sample_idx->rows != 1 && sample_idx->cols != 1 || !CV_IS_MAT_CONT(sample_idx->type) ) in cvPreprocessCategoricalResponses()
754 if( sample_idx->rows + sample_idx->cols - 1 > sample_count ) in cvPreprocessCategoricalResponses()
756 map = sample_idx->data.i; in cvPreprocessCategoricalResponses()
757 sample_count = sample_idx->rows + sample_idx->cols - 1; in cvPreprocessCategoricalResponses()
840 const CvMat* var_idx, const CvMat* sample_idx, in cvGetTrainSamples() argument
860 sample_count = sample_idx ? sample_idx->cols + sample_idx->rows - 1 : in cvGetTrainSamples()
876 s_idx = sample_idx ? sample_idx->data.i : 0; in cvGetTrainSamples()
956 const CvMat* sample_idx, in cvPrepareTrainData() argument
1008 if( sample_idx ) in cvPrepareTrainData()
1009 CV_CALL( _sample_idx = cvPreprocessIndexArray( sample_idx, sample_all )); in cvPrepareTrainData()
1416 const CvMat* sample_idx, int samples_all, in cvWritebackLabels() argument
1436 if( sample_idx ) in cvWritebackLabels()
1438 CV_ASSERT( sample_idx->rows == 1 && CV_MAT_TYPE(sample_idx->type) == CV_32SC1 ); in cvWritebackLabels()
1439 samples_selected = sample_idx->cols; in cvWritebackLabels()
1466 cvSize( 1, samples_selected ), sample_idx ? sample_idx->data.i : 0 )); in cvWritebackLabels()
1510 sample_idx ? sample_idx->data.i : 0 )); in cvWritebackLabels()
1521 CvMat* probs, const CvMat* sample_idx )
1580 if( sample_idx )
1582 if( !CV_IS_MAT(sample_idx) )
1585 if( sample_idx->cols != 1 && sample_idx->rows != 1 )
1588 samples_selected = sample_idx->rows + sample_idx->cols - 1;
1590 if( CV_MAT_TYPE(sample_idx->type) == CV_32SC1 )
1598 sample_idx_step = sample_idx->step ?
1599 sample_idx->step / CV_ELEM_SIZE(sample_idx->type) : 1;
1630 if( sample_idx && CV_MAT_TYPE(sample_idx->type) == CV_32SC1 )
1635 sample_idx_buffer->data.ptr[sample_idx->data.i[i*sample_idx_step]] = 1;
1637 sample_idx = sample_idx_buffer;
1644 if( sample_idx && sample_idx->data.ptr[i*sample_idx_step] == 0 )
1667 if( sample_idx && sample_idx->data.ptr[idx0*sample_idx_step] == 0 )
1680 if( sample_idx )
1682 if( CV_MAT_TYPE(sample_idx->type) == CV_32SC1 )
1684 idx = sample_idx->data.i[i*sample_idx_step];
1688 else if( CV_MAT_TYPE(sample_idx->type) == CV_8UC1 &&
1689 sample_idx->data.ptr[i*sample_idx_step] == 0 )