Lines Matching refs:df
1325 CvSVMDecisionFunc* df = 0; in do_train() local
1333 CV_CALL( decision_func = df = in do_train()
1334 (CvSVMDecisionFunc*)cvAlloc( sizeof(df[0]) )); in do_train()
1336 df->rho = 0; in do_train()
1338 responses->data.i, 0, 0, temp_storage, alpha, df->rho )) in do_train()
1344 sv_total = df->sv_count = sv_count; in do_train()
1345 CV_CALL( df->alpha = (double*)cvMemStorageAlloc( storage, sv_count*sizeof(df->alpha[0])) ); in do_train()
1354 df->alpha[k++] = alpha[i]; in do_train()
1382 CV_CALL( decision_func = df = (CvSVMDecisionFunc*)cvAlloc( in do_train()
1383 (class_count*(class_count-1)/2)*sizeof(df[0]))); in do_train()
1421 for( j = i+1; j < class_count; j++, df++ ) in do_train()
1447 Cp, Cn, temp_storage, alpha, df->rho )) in do_train()
1453 df->sv_count = sv_count; in do_train()
1455 CV_CALL( df->alpha = (double*)cvMemStorageAlloc( temp_storage, in do_train()
1456 sv_count*sizeof(df->alpha[0]))); in do_train()
1457 CV_CALL( df->sv_index = (int*)cvMemStorageAlloc( temp_storage, in do_train()
1458 sv_count*sizeof(df->sv_index[0]))); in do_train()
1465 df->sv_index[k1] = si + k; in do_train()
1466 df->alpha[k1++] = alpha[k]; in do_train()
1475 df->sv_index[k1] = sj + k; in do_train()
1476 df->alpha[k1++] = alpha[ci + k]; in do_train()
1502 df = (CvSVMDecisionFunc*)decision_func; in do_train()
1507 for( j = i+1; j < class_count; j++, df++ ) in do_train()
1509 for( k = 0; k < df->sv_count; k++ ) in do_train()
1511 df->sv_index[k] = sv_tab[df->sv_index[k]]-1; in do_train()
1512 assert( (unsigned)df->sv_index[k] < (unsigned)sv_total ); in do_train()
1915 CvSVMDecisionFunc* df = (CvSVMDecisionFunc*)decision_func; in predict() local
1916 int i, sv_count = df->sv_count; in predict()
1917 double sum = -df->rho; in predict()
1921 sum += buffer[i]*df->alpha[i]; in predict()
1928 CvSVMDecisionFunc* df = (CvSVMDecisionFunc*)decision_func; in predict() local
1937 for( j = i+1; j < class_count; j++, df++ ) in predict()
1939 double sum = -df->rho; in predict()
1940 int sv_count = df->sv_count; in predict()
1942 sum += df->alpha[k]*buffer[df->sv_index[k]]; in predict()
2046 const CvSVMDecisionFunc* df = decision_func; in write() local
2086 df = decision_func; in write()
2091 int sv_count = df[i].sv_count; in write()
2094 cvWriteReal( fs, "rho", df[i].rho ); in write()
2096 cvWriteRawData( fs, df[i].alpha, df[i].sv_count, "d" ); in write()
2101 cvWriteRawData( fs, df[i].sv_index, df[i].sv_count, "i" ); in write()
2207 CvSVMDecisionFunc* df; in read() local
2272 CV_CALL( df = decision_func = (CvSVMDecisionFunc*)cvAlloc( df_count*sizeof(df[0]) )); in read()
2283 df[i].sv_count = sv_count; in read()
2285 df[i].rho = cvReadRealByName( fs, df_elem, "rho", not_found_dbl ); in read()
2286 if( fabs(df[i].rho - not_found_dbl) < DBL_EPSILON ) in read()
2292 CV_CALL( df[i].alpha = (double*)cvMemStorageAlloc( storage, in read()
2293 sv_count*sizeof(df[i].alpha[0]))); in read()
2296 CV_CALL( cvReadRawData( fs, alpha_node, df[i].alpha, "d" )); in read()
2303 CV_CALL( df[i].sv_index = (int*)cvMemStorageAlloc( storage, in read()
2304 sv_count*sizeof(df[i].sv_index[0]))); in read()
2307 CV_CALL( cvReadRawData( fs, index_node, df[i].sv_index, "i" )); in read()
2310 df[i].sv_index = 0; in read()