WEKA 3.8.5 - Bug on ClassifierSubsetEval.evaluateSubset()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

WEKA 3.8.5 - Bug on ClassifierSubsetEval.evaluateSubset()

geraldonetto
Dear Friends,

I was doing a static analysis on Weka and it seems there is a little bug on ClassifierSubsetEval.java, method evaluateSubset(BitSet subset, Instances holdOut):

We have this switch case:
    switch (m_evaluationMeasure.getID()) {
    ...
    case EVAL_AUC:
      if (m_IRClassVal < 0) {
        evalMetric = evaluation.weightedAreaUnderROC();
      } else {
        evalMetric = evaluation.areaUnderROC(m_IRClassVal);
      }
      break;
    case EVAL_AUPRC:
      if (m_IRClassVal < 0) {
        evalMetric = evaluation.weightedAreaUnderPRC();
      } else {
        evalMetric = evaluation.areaUnderPRC(m_IRClassVal);
      }
    case EVAL_CORRELATION:
      evalMetric = evaluation.correlationCoefficient();
      break;
    default:
   ...

As we can see, evalMetric value from EVAL_AUPRC is overwritten by EVAL_CORRELATION
It seems that a simple break; would be enough
If I find more things, I'll report accordingly


Kind Regards,
Geraldo Netto
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to [hidden email]
To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html