public class StackingC extends Stacking implements OptionHandler, TechnicalInformationHandler
@inproceedings{Seewald2002, author = {A.K. Seewald}, booktitle = {Nineteenth International Conference on Machine Learning}, editor = {C. Sammut and A. Hoffmann}, pages = {554-561}, publisher = {Morgan Kaufmann Publishers}, title = {How to Make Stacking Better and Faster While Also Taking Care of an Unknown Weakness}, year = {2002} }Valid options are:
-M <scheme specification> Full name of meta classifier, followed by options. Must be a numeric prediction scheme. Default: Linear Regression.
-X <number of folds> Sets the number of cross-validation folds.
-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
Modifier and Type | Field and Description |
---|---|
protected Remove |
m_attrFilter
Filter to transform metaData - Remove
|
protected MakeIndicator |
m_makeIndicatorFilter
Filter to transform metaData - MakeIndicator
|
protected Classifier[] |
m_MetaClassifiers
The meta classifiers (one for each class, like in ClassificationViaRegression)
|
m_BaseFormat, m_MetaClassifier, m_MetaFormat, m_NumFolds
m_Seed
m_Classifiers
m_Debug
Constructor and Description |
---|
StackingC()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
double[] |
distributionForInstance(Instance instance)
Classifies a given instance using the stacked classifier.
|
protected void |
generateMetaLevel(Instances newData,
Random random)
Method that builds meta level.
|
String |
getRevision()
Returns the revision string.
|
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing
detailed information about the technical background of this class,
e.g., paper reference or book this class is based on.
|
String |
globalInfo()
Returns a string describing classifier
|
static void |
main(String[] argv)
Main method for testing this class.
|
protected String |
metaOption()
String describing option for setting meta classifier
|
protected void |
processMetaOptions(String[] options)
Process options setting meta classifier.
|
String |
toString()
Output a representation of this classifier
|
buildClassifier, getCapabilities, getMetaClassifier, getNumFolds, getOptions, listOptions, metaClassifierTipText, metaFormat, metaInstance, numFoldsTipText, setMetaClassifier, setNumFolds, setOptions
getSeed, seedTipText, setSeed
classifiersTipText, getClassifier, getClassifiers, getClassifierSpec, setClassifiers
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, runClassifier, setDebug
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getOptions, listOptions, setOptions
protected Classifier[] m_MetaClassifiers
protected Remove m_attrFilter
protected MakeIndicator m_makeIndicatorFilter
public String globalInfo()
globalInfo
in class Stacking
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
getTechnicalInformation
in class Stacking
protected String metaOption()
metaOption
in class Stacking
protected void processMetaOptions(String[] options) throws Exception
processMetaOptions
in class Stacking
options
- the meta options to parseException
- if parsing failsprotected void generateMetaLevel(Instances newData, Random random) throws Exception
generateMetaLevel
in class Stacking
newData
- the data to work withrandom
- the random number generator to use for cross-validationException
- if generation failspublic double[] distributionForInstance(Instance instance) throws Exception
distributionForInstance
in class Stacking
instance
- the instance to be classifiedException
- if instance could not be classified
successfullypublic String toString()
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Stacking
public static void main(String[] argv)
argv
- should contain the following arguments:
-t training file [-T test file] [-c class index]Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.