Rejection rate with Adaboost.M2

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

Rejection rate with Adaboost.M2

Hayfa Azibi
Hello, 
I am working with adaboost.M2 to improve the performance of a weak classifier. My goal is to display the rejection rate at each iteration. However, my code doesn't take into account the previous weak classifiers  when classifying instances. I am using the following code:  
public double [] distributionForInstance(Instance instance) 
    throws Exception {
      
    // default model?
    if (m_CNC!= null) {
      return m_CNC.distributionForInstance(instance);
    }
    if (m_NumIterationsPerformed == 0) {
      throw new Exception("No model built");
    }
    double [] sums = new double [instance.numClasses()]; 
      for (int i = 0; i < m_NumIterationsPerformed; i++) {
      double classification = m_Classifiers[i].classifyInstance(instance);
      if (Utils.isMissingValue(classification)) {
      return sums; 
      } 
      else { 
      sums[(int)m_Classifiers[i].classifyInstance(instance)] += m_Betas[i];
      }
      }
      return Utils.logs2probs(sums);
    }
   
What should be done to resolve this issue ?
Sincerely, 
Hayfa Azibi



_______________________________________________
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