Home | History | Annotate | Download | only in src

Lines Matching defs:priors

50         priors = priors_mult = counts = buf = direction = split_buf = 0;
64 priors = priors_mult = counts = buf = direction = split_buf = 0;
162 cvReleaseMat( &priors );
169 priors = data->priors; data->priors = 0;
508 have_priors = is_classifier && params.priors;
513 CV_CALL( priors = cvCreateMat( 1, m, CV_64F ));
516 double val = have_priors ? params.priors[i] : 1.;
519 priors->data.db[i] = val;
525 cvScale( priors, priors, 1./sum );
527 CV_CALL( priors_mult = cvCloneMat( priors ));
923 cvReleaseMat( &priors );
1038 if( priors )
1039 cvWrite( fs, "priors", priors );
1107 priors = (CvMat*)cvReadByName( fs, tparams_node, "priors" );
1108 if( priors )
1110 if( !CV_IS_MAT(priors) )
1111 CV_ERROR( CV_StsParseError, "priors must stored as a matrix" );
1112 priors_mult = cvCloneMat( priors );
1459 const double* priors = data->priors_mult->data.db;
1465 double w = priors[responses[i]];
1498 const double* priors = data->priors_mult->data.db;
1504 double w = priors[responses[idx]];
1512 double w = priors[responses[idx]];
1579 const double* priors = data->have_priors ? data->priors_mult->data.db : 0;
1592 if( !priors )
1625 double wv = rc[i]*priors[i];
1634 double p = priors[idx], p2 = p*p;
1662 // TODO: consider adding priors (class weights) and sample weights to the clustering algorithm
1775 const double* priors = data->priors_mult->data.db;
1826 sum += cjk[j*m + k]*priors[k];
1865 double p = priors[k], p2 = p*p;
1880 double p = priors[k], p2 = p*p;
2110 const double* priors = data->priors_mult->data.db;
2117 double w = priors[responses[idx]];
2132 double w = priors[responses[idx]];
2209 const double* priors = data->priors_mult->data.db;
2215 double w = priors[responses[i]];
2276 double* priors = data->priors_mult->data.db;
2305 // compute priors_mult from priors, take the sample ratio into account.
2310 priors[k] = data->priors->data.db[k]*(n_k ? 1./n_k : 0.);
2311 sum += priors[k];
2315 priors[k] *= sum;
2320 double val = cls_count[k]*priors[k];
2341 double w = priors[k];