Definition at line 200 of file FikSvm.h. References max, min, mProbA, mProbB, and mProbIndex. Referenced by Impala::Core::Training::ApplyConceptsHelperFik::Predict(). 00201 { 00202 Real64 min_prob = 1e-7; 00203 int nr_class = 2; 00204 double prob_estimates[2]; 00205 double** pairwise_prob=Malloc(double *, nr_class); 00206 for (int i=0 ; i<nr_class ; i++) 00207 pairwise_prob[i] = Malloc(double, nr_class); 00208 double pred = sigmoid_predict(decValue, mProbA, mProbB); 00209 pairwise_prob[0][1] = std::min(std::max(pred, min_prob), 1 - min_prob); 00210 pairwise_prob[1][0] = 1 - pairwise_prob[0][1]; 00211 multiclass_probability(nr_class, pairwise_prob, prob_estimates); 00212 for (int i=0 ; i<nr_class ; i++) 00213 free(pairwise_prob[i]); 00214 free(pairwise_prob); 00215 return prob_estimates[mProbIndex]; 00216 }
|