public class Grading extends Stacking implements TechnicalInformationHandler
@inproceedings{Seewald2001, address = {Berlin/Heidelberg/New York/Tokyo}, author = {A.K. Seewald and J. Fuernkranz}, booktitle = {Advances in Intelligent Data Analysis: 4th International Conference}, editor = {F. Hoffmann et al.}, pages = {115-124}, publisher = {Springer}, title = {An Evaluation of Grading Classifiers}, year = {2001} }Valid options are:
-M <scheme specification> Full name of meta classifier, followed by options. (default: "weka.classifiers.rules.Zero")
-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 double[] |
m_InstPerClass
InstPerClass
|
protected Classifier[] |
m_MetaClassifiers
The meta classifiers, one for each base classifier.
|
m_BaseFormat, m_MetaClassifier, m_MetaFormat, m_NumFolds
m_Seed
m_Classifiers
m_Debug
Constructor and Description |
---|
Grading() |
Modifier and Type | Method and Description |
---|---|
double[] |
distributionForInstance(Instance instance)
Returns class probabilities for a given instance using the stacked classifier.
|
protected void |
generateMetaLevel(Instances newData,
Random random)
Generates the meta data
|
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 Instances |
metaFormat(Instances instances)
Makes the format for the level-1 data.
|
protected Instance |
metaInstance(Instance instance,
int k)
Makes a level-1 instance from the given instance.
|
String |
toString()
Output a representation of this classifier
|
buildClassifier, getCapabilities, getMetaClassifier, getNumFolds, getOptions, listOptions, metaClassifierTipText, metaInstance, metaOption, numFoldsTipText, processMetaOptions, setMetaClassifier, setNumFolds, setOptions
getSeed, seedTipText, setSeed
classifiersTipText, getClassifier, getClassifiers, getClassifierSpec, setClassifiers
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, runClassifier, setDebug
protected Classifier[] m_MetaClassifiers
protected double[] m_InstPerClass
public String globalInfo()
globalInfo
in class Stacking
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
getTechnicalInformation
in class Stacking
protected void generateMetaLevel(Instances newData, Random random) throws Exception
generateMetaLevel
in class Stacking
newData
- the data to work onrandom
- the random number generator used in the generationException
- 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()
protected Instances metaFormat(Instances instances) throws Exception
metaFormat
in class Stacking
instances
- the level-0 formatException
- if an error occursprotected Instance metaInstance(Instance instance, int k) throws Exception
instance
- the instance to be transformedk
- index of the classifierException
- if an error occurspublic 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.