public double evaluationForSingleInstance(double[] dist,Instance instance,boolean storePredictions) throws Exception {
  double pred;
  if (m_ClassIsNominal) {
    pred=Utils.maxIndex(dist);
    if (dist[(int)pred] <= 0) {
      pred=Utils.missingValue();
    }
    updateStatsForClassifier(dist,instance);
    if (storePredictions && !m_DiscardPredictions) {
      if (m_Predictions == null) {
        m_Predictions=new ArrayList<Prediction>();
      }
      m_Predictions.add(new NominalPrediction(instance.classValue(),dist,instance.weight()));
    }
  }
 else {
    pred=dist[0];
    updateStatsForPredictor(pred,instance);
    if (storePredictions && !m_DiscardPredictions) {
      if (m_Predictions == null) {
        m_Predictions=new ArrayList<Prediction>();
      }
      m_Predictions.add(new NumericPrediction(instance.classValue(),pred,instance.weight()));
    }
  }
  return pred;
}

public double evaluationForSingleInstance ( double [ ] dist , Instance instance , boolean storePredictions ) throws Exception { double pred ; if ( m_ClassIsNominal ) { pred = Utils . maxIndex ( dist ) ; if ( dist [ ( int ) pred ] <= 0 ) { pred = Utils . missingValue ( ) ; } updateStatsForClassifier ( dist , instance ) ; if ( storePredictions && ! m_DiscardPredictions ) { if ( m_Predictions == null ) { m_Predictions = new ArrayList < Prediction > ( ) ; } m_Predictions . add ( new NominalPrediction ( instance . classValue ( ) , dist , instance . weight ( ) ) ) ; } } else { pred = dist [ 0 ] ; updateStatsForPredictor ( pred , instance ) ; if ( storePredictions && ! m_DiscardPredictions ) { if ( m_Predictions == null ) { m_Predictions = new ArrayList < Prediction > ( ) ; } m_Predictions . add ( new NumericPrediction ( instance . classValue ( ) , pred , instance . weight ( ) ) ) ; } } return pred ; }
evaluates the supplied distribution on a single instance .
