Package weka.classifiers.evaluation

Examples of weka.classifiers.evaluation.NominalPrediction


      }
      updateStatsForClassifier(dist, instance);
      if (storePredictions) {
        if (m_Predictions == null)
          m_Predictions = new FastVector();
        m_Predictions.addElement(new NominalPrediction(instance.classValue(), dist,
                                                       instance.weight()));
      }
    } else {
      pred = dist[0];
      updateStatsForPredictor(pred, instance);
View Full Code Here


      pred = Utils.maxIndex(dist);
      if (dist[(int)pred] <= 0) {
  pred = Instance.missingValue();
      }
      updateStatsForClassifier(dist, instance);
      m_Predictions.addElement(new NominalPrediction(instance.classValue(), dist,
    instance.weight()));
    } else {
      pred = classifier.classifyInstance(classMissing);
      updateStatsForPredictor(pred, instance);
    }
View Full Code Here

      pred = Utils.maxIndex(dist);
      if (dist[(int)pred] <= 0) {
  pred = Instance.missingValue();
      }
      updateStatsForClassifier(dist, instance);
      m_Predictions.addElement(new NominalPrediction(instance.classValue(), dist,
    instance.weight()));
    } else {
      pred = dist[0];
      updateStatsForPredictor(pred, instance);
    }
View Full Code Here

    result = useClassifier();
    assertTrue(result.size() != 0);
    double minp = 0;
    double maxp = 0;
    for (int i = 0; i < result.size(); i++) {
      NominalPrediction p = (NominalPrediction)result.elementAt(i);
      double prob = p.distribution()[cind];
      if ((i == 0) || (prob < minp)) minp = prob;
      if ((i == 0) || (prob > maxp)) maxp = prob;
    }
    assertTrue("Upper limit shouldn't increase", maxp <= 1.0);
    assertTrue("Lower limit shouldn'd decrease", minp >= 0.25);
View Full Code Here

      pred = Utils.maxIndex(dist);
      if (dist[(int) pred] <= 0) {
        pred = Instance.missingValue();
      }
      updateStatsForClassifier(dist, instance);
      m_Predictions.addElement(new NominalPrediction(instance.classValue(), dist,
          instance.weight()));
    } else {
      pred = classifier.classifyInstance(classMissing);
      updateStatsForPredictor(pred, instance);
    }
View Full Code Here

      pred = Utils.maxIndex(dist);
      if (dist[(int) pred] <= 0) {
        pred = Instance.missingValue();
      }
      updateStatsForClassifier(dist, instance);
      m_Predictions.addElement(new NominalPrediction(instance.classValue(), dist,
          instance.weight()));
    } else {
      pred = dist[0];
      updateStatsForPredictor(pred, instance);
    }
View Full Code Here

      }
      updateStatsForClassifier(dist, instance);
      if (storePredictions && !m_DiscardPredictions) {
        if (m_Predictions == null)
          m_Predictions = new FastVector();
        m_Predictions.addElement(new NominalPrediction(instance.classValue(), dist,
                                                       instance.weight()));
      }
    } else {
      pred = dist[0];
      updateStatsForPredictor(pred, instance);
View Full Code Here

TOP

Related Classes of weka.classifiers.evaluation.NominalPrediction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.