All Downloads are FREE. Search and download functionalities are using the official Maven repository.

weka.classifiers.meta.MultiScheme Maven / Gradle / Ivy

Go to download

The Waikato Environment for Knowledge Analysis (WEKA), a machine learning workbench. This version represents the developer version, the "bleeding edge" of development, you could say. New functionality gets added to this version.

There is a newer version: 3.9.6
Show newest version
/*
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see .
 */

/*
 *    MultiScheme.java
 *    Copyright (C) 1999-2012 University of Waikato, Hamilton, New Zealand
 *
 */

package weka.classifiers.meta;

import java.util.Collections;
import java.util.Enumeration;
import java.util.Random;
import java.util.Vector;

import weka.classifiers.Classifier;
import weka.classifiers.Evaluation;
import weka.classifiers.RandomizableMultipleClassifiersCombiner;
import weka.core.Instance;
import weka.core.Instances;
import weka.core.Option;
import weka.core.OptionHandler;
import weka.core.RevisionUtils;
import weka.core.Utils;

/**
 
 * Class for selecting a classifier from among several using cross validation on the training data or the performance on the training data. Performance is measured based on percent correct (classification) or mean-squared error (regression).
 * 

* * Valid options are:

* *

 -X <number of folds>
 *  Use cross validation for model selection using the
 *  given number of folds. (default 0, is to
 *  use training error)
* *
 -S <num>
 *  Random number seed.
 *  (default 1)
* *
 -B <classifier specification>
 *  Full class name of classifier to include, followed
 *  by scheme options. May be specified multiple times.
 *  (default: "weka.classifiers.rules.ZeroR")
* *
 -D
 *  If set, classifier is run in debug mode and
 *  may output additional info to the console
* * * @author Len Trigg ([email protected]) * @version $Revision: 10141 $ */ public class MultiScheme extends RandomizableMultipleClassifiersCombiner { /** for serialization */ static final long serialVersionUID = 5710744346128957520L; /** The classifier that had the best performance on training data. */ protected Classifier m_Classifier; /** The index into the vector for the selected scheme */ protected int m_ClassifierIndex; /** * Number of folds to use for cross validation (0 means use training * error for selection) */ protected int m_NumXValFolds; /** * Returns a string describing classifier * @return a description suitable for * displaying in the explorer/experimenter gui */ public String globalInfo() { return "Class for selecting a classifier from among several using cross " + "validation on the training data or the performance on the " + "training data. Performance is measured based on percent correct " + "(classification) or mean-squared error (regression)."; } /** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */ public Enumeration




© 2015 - 2024 Weber Informatics LLC | Privacy Policy