|
@@ -588,44 +588,44 @@ int main ( int argc, char **argv )
|
|
|
}
|
|
|
else if (queryStrategy == GPPREDVAR)
|
|
|
{
|
|
|
- NICE::Vector singleUncertainties;
|
|
|
+ double uncertainty;
|
|
|
//use the pred variance computation specified in the config file
|
|
|
- classifier->predictUncertainty( example, singleUncertainties );
|
|
|
+ classifier->predictUncertainty( example, uncertainty );
|
|
|
//take the maximum of the scores for the predictive variance
|
|
|
- scores.push_back( std::pair<int,double> ( exIndex, singleUncertainties[0]) );
|
|
|
+ scores.push_back( std::pair<int,double> ( exIndex, uncertainty) );
|
|
|
}
|
|
|
else if (queryStrategy == GPHEURISTIC)
|
|
|
{
|
|
|
- NICE::Vector singleUncertainties;
|
|
|
+ double uncertainty;
|
|
|
//use the pred variance computation specified in the config file
|
|
|
- classifier->predictUncertainty( example, singleUncertainties );
|
|
|
+ classifier->predictUncertainty( example, uncertainty );
|
|
|
//compute the mean values for every class
|
|
|
ClassificationResult r = classifier->classify( example );
|
|
|
//take the minimum of the scores for the heuristic measure
|
|
|
- scores.push_back( std::pair<int,double> ( exIndex, fabs(r.scores[0]) / sqrt( squaredNoise + singleUncertainties[0] )) );
|
|
|
+ scores.push_back( std::pair<int,double> ( exIndex, fabs(r.scores[0]) / sqrt( squaredNoise + uncertainty )) );
|
|
|
}
|
|
|
else if (queryStrategy == GPHEURISTICPLUS)
|
|
|
{
|
|
|
- NICE::Vector singleUncertainties;
|
|
|
+ double uncertainty;
|
|
|
//use the pred variance computation specified in the config file
|
|
|
- classifier->predictUncertainty( example, singleUncertainties );
|
|
|
+ classifier->predictUncertainty( example, uncertainty );
|
|
|
//compute the mean values for every class
|
|
|
ClassificationResult r = classifier->classify( example );
|
|
|
//take the minimum of the scores for the heuristic measure
|
|
|
- scores.push_back( std::pair<int,double> ( exIndex, fabs(r.scores[0]) + sqrt( squaredNoise + singleUncertainties[0] )) );
|
|
|
+ scores.push_back( std::pair<int,double> ( exIndex, fabs(r.scores[0]) + sqrt( squaredNoise + uncertainty )) );
|
|
|
}
|
|
|
else if (queryStrategy == GPBALANCE)
|
|
|
{
|
|
|
- NICE::Vector singleUncertainties;
|
|
|
+ double uncertainty;
|
|
|
//use the pred variance computation specified in the config file
|
|
|
- classifier->predictUncertainty( example, singleUncertainties );
|
|
|
+ classifier->predictUncertainty( example, uncertainty );
|
|
|
//compute the mean values for every class
|
|
|
ClassificationResult r = classifier->classify( example );
|
|
|
double scorePositive (fabs (r.scores[0] - 1.0 ));
|
|
|
double scoreNegative (fabs (r.scores[0] + 1.0 ));
|
|
|
double score = scorePositive < scoreNegative ? scorePositive : scoreNegative;
|
|
|
//take the minimum of the scores for the heuristic measure
|
|
|
- scores.push_back( std::pair<int,double> ( exIndex, score / ( squaredNoise + singleUncertainties[0] )) );
|
|
|
+ scores.push_back( std::pair<int,double> ( exIndex, score / ( squaredNoise + uncertainty )) );
|
|
|
}
|
|
|
}
|
|
|
float time_score_computation = ( float ) ( clock() - unc_pred_start_time ) ;
|