Package weka.core

Examples of weka.core.FastVector.appendElements()


  ThresholdCurve tc = new ThresholdCurve();
  EvaluationUtils eu = new EvaluationUtils();
  FastVector predictions = new FastVector();
  for (int i = 0; i < runs; i++) {
    eu.setSeed(seed + i);
    predictions.appendElements(eu.getCVPredictions(classifier, inst, folds));
  }
 
  if (valueIndex != null)
    result = tc.getCurve(predictions, valueIndex.getIndex());
  else
View Full Code Here


        new weka.classifiers.evaluation.EvaluationUtils();
      //weka.classifiers.Classifier classifier = new weka.classifiers.functions.Logistic();
      weka.classifiers.Classifier classifier = new weka.classifiers.bayes.NaiveBayes();
      FastVector predictions = new FastVector();
      eu.setSeed(1);
      predictions.appendElements(eu.getCVPredictions(classifier, train, 10));
      Instances result = tc.getCurve(predictions, 0);
      PlotData2D pd = new PlotData2D(result);
      pd.m_alwaysDisplayPointsOfThisSize = 10;

      boolean[] connectPoints = new boolean[result.numInstances()];
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.