Examples of evaluateModel()


Examples of weka.classifiers.Evaluation.evaluateModel()

      alphas[iteration] = nodeToPrune.m_alpha;
      
      //log error
      if (errors != null) {
    eval = new Evaluation(test);
    eval.evaluateModel(this, test);
    errors[iteration] = eval.errorRate();
      }

      //update errors/alphas
      treeErrors();
View Full Code Here

Examples of weka.classifiers.Evaluation.evaluateModel()

   
  Evaluation eval = new Evaluation(m_train);
   
  if (!m_isLeaf) {
      m_isLeaf = true;
      eval.evaluateModel(this, m_train);
      m_isLeaf = false;
      m_numIncorrectModel = eval.incorrect();
      for (int i = 0; i < m_sons.length; i++) m_sons[i].modelErrors();
  } else {
      eval.evaluateModel(this, m_train);
View Full Code Here

Examples of weka.classifiers.Evaluation.evaluateModel()

      eval.evaluateModel(this, m_train);
      m_isLeaf = false;
      m_numIncorrectModel = eval.incorrect();
      for (int i = 0; i < m_sons.length; i++) m_sons[i].modelErrors();
  } else {
      eval.evaluateModel(this, m_train);
      m_numIncorrectModel = eval.incorrect();
  }
    }
   
    /**
 
View Full Code Here

Examples of weka.classifiers.Evaluation.evaluateModel()

     * @return the error rate
     * @throws Exception if something goes wrong
     */
    protected double getErrorRate(Instances data) throws Exception {
  Evaluation eval = new Evaluation(data);
  eval.evaluateModel(this,data);
  return eval.errorRate();
    }

    /**
     * Returns the error of the probability estimates for the current model on a set of instances.
View Full Code Here

Examples of weka.classifiers.Evaluation.evaluateModel()

     * @return the error
     * @throws Exception if something goes wrong
     */
    protected double getMeanAbsoluteError(Instances data) throws Exception {
  Evaluation eval = new Evaluation(data);
  eval.evaluateModel(this,data);
  return eval.meanAbsoluteError();
    }

    /**
     * Helper function to find the minimum in an array of error values.
View Full Code Here

Examples of weka.classifiers.Evaluation.evaluateModel()

     */
    public void errorAnalysis(String attribute) throws Exception {
        readModel();
        _logger.info("Performing error analysis");
        Evaluation eval = new Evaluation(_testInstances);
        eval.evaluateModel(_cls, _testInstances);
        _predictionList = new HashMap<String, List<Prediction>>();
        String predicted, actual = null;
        double[] distribution = null;
        _predictionList.put(_config._truePositives, new ArrayList<Prediction>());
        _predictionList.put(_config._trueNegatives, new ArrayList<Prediction>());
View Full Code Here

Examples of weka.classifiers.Evaluation.evaluateModel()

     */
    public void evaluate() throws Exception {
        readModel();
        _logger.info("Classifying with " + _config._classifier);
        Evaluation eval = new Evaluation(_testInstances);
        eval.evaluateModel(_cls, _testInstances);
        _logger.info("\n" + eval.toSummaryString());
        try {
            _logger.info("\n" + eval.toClassDetailsString());
        } catch (Exception e) {
            _logger.info("Can not create class details" + _config._classifier);
View Full Code Here

Examples of weka.classifiers.Evaluation.evaluateModel()

              
            // Build the classifier
            filteredClassifier.buildClassifier(train);
            
            // Evaluate
            eval.evaluateModel(classifier, test);
           
            // Add predictions
            AddClassification filter = new AddClassification();
            filter.setClassifier(classifier);
            filter.setOutputClassification(true);
View Full Code Here

Examples of weka.classifiers.Evaluation.evaluateModel()

            
          // Build the classifier
          filteredClassifier.buildClassifier(train);
          
          // Evaluate
          eval.evaluateModel(filteredClassifier, test);
         
          // Add predictions
          AddClassification filter = new AddClassification();
          filter.setClassifier(filteredClassifier);
          filter.setOutputClassification(true);
View Full Code Here

Examples of weka.classifiers.Evaluation.evaluateModel()

              
            // Build the classifier
            filteredClassifier.buildClassifier(train);
            
            // Evaluate
            eval.evaluateModel(classifier, test);
           
            // Add predictions
            AddClassification filter = new AddClassification();
            filter.setClassifier(classifier);
            filter.setOutputClassification(true);
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.