程序包 weka.experiment
类 ClassifierSplitEvaluator
java.lang.Object
weka.experiment.ClassifierSplitEvaluator
public class ClassifierSplitEvaluator
extends Object
implements SplitEvaluator, OptionHandler, AdditionalMeasureProducer, RevisionHandler
A SplitEvaluator that produces results for a
classification scheme on a nominal class attribute.
Valid options are:
-W <class name> The full class name of the classifier. eg: weka.classifiers.bayes.NaiveBayes
-C <index> The index of the class for which IR statistics are to be output. (default 1)
-I <index> The index of an attribute to output in the results. This attribute should identify an instance in order to know which instances are in the test set of a cross validation. if 0 no output (default 0).
-P Add target and prediction columns to the result for each fold.
Options specific to classifier weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the consoleAll options after -- will be passed to the classifier.
- 版本:
- $Revision: 11198 $
- 作者:
- Len Trigg (trigg@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Returns the tip text for this propertyReturns an enumeration of any additional measure names that might be in the classifierint
Get the index of Attibute Identifying the instancesint
Get the value of ClassForIRStatistics.Get the value of Classifier.Object[]
getKey()
Gets the key describing the current SplitEvaluator.String[]
Gets the names of each of the key columns produced for a single run.Object[]
Gets the data types of each of the key columns produced for a single run.double
getMeasure
(String additionalMeasureName) Returns the value of the named measureString[]
Gets the current settings of the Classifier.boolean
Gets the raw output from the classifierObject[]
Gets the results for the supplied train and test datasets.String[]
Gets the names of each of the result columns produced for a single run.Object[]
Gets the data types of each of the result columns produced for a single run.Returns the revision string.Returns a string describing this split evaluatorReturns an enumeration describing the available options..void
setAdditionalMeasures
(String[] additionalMeasures) Set a list of method names for additional measures to look for in Classifiers.void
setAttributeID
(int v) Set the index of Attibute Identifying the instancesvoid
setClassForIRStatistics
(int v) Set the value of ClassForIRStatistics.void
setClassifier
(Classifier newClassifier) Sets the classifier.void
setClassifierName
(String newClassifierName) Set the Classifier to use, given it's class name.void
setOptions
(String[] options) Parses a given list of options.void
setPredTargetColumn
(boolean v) Set the flag for prediction and target output.toString()
Returns a text description of the split evaluator.
-
构造器详细资料
-
ClassifierSplitEvaluator
public ClassifierSplitEvaluator()No args constructor.
-
-
方法详细资料
-
globalInfo
Returns a string describing this split evaluator- 返回:
- a description of the split evaluator suitable for displaying in the explorer/experimenter gui
-
listOptions
Returns an enumeration describing the available options..- 指定者:
listOptions
在接口中OptionHandler
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. Valid options are:-W <class name> The full class name of the classifier. eg: weka.classifiers.bayes.NaiveBayes
-C <index> The index of the class for which IR statistics are to be output. (default 1)
-I <index> The index of an attribute to output in the results. This attribute should identify an instance in order to know which instances are in the test set of a cross validation. if 0 no output (default 0).
-P Add target and prediction columns to the result for each fold.
Options specific to classifier weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the console
All options after -- will be passed to the classifier.- 指定者:
setOptions
在接口中OptionHandler
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the Classifier.- 指定者:
getOptions
在接口中OptionHandler
- 返回:
- an array of strings suitable for passing to setOptions
-
setAdditionalMeasures
Set a list of method names for additional measures to look for in Classifiers. This could contain many measures (of which only a subset may be produceable by the current Classifier) if an experiment is the type that iterates over a set of properties.- 指定者:
setAdditionalMeasures
在接口中SplitEvaluator
- 参数:
additionalMeasures
- a list of method names
-
enumerateMeasures
Returns an enumeration of any additional measure names that might be in the classifier- 指定者:
enumerateMeasures
在接口中AdditionalMeasureProducer
- 返回:
- an enumeration of the measure names
-
getMeasure
Returns the value of the named measure- 指定者:
getMeasure
在接口中AdditionalMeasureProducer
- 参数:
additionalMeasureName
- the name of the measure to query for its value- 返回:
- the value of the named measure
- 抛出:
IllegalArgumentException
- if the named measure is not supported
-
getKeyTypes
Gets the data types of each of the key columns produced for a single run. The number of key fields must be constant for a given SplitEvaluator.- 指定者:
getKeyTypes
在接口中SplitEvaluator
- 返回:
- an array containing objects of the type of each key column. The objects should be Strings, or Doubles.
-
getKeyNames
Gets the names of each of the key columns produced for a single run. The number of key fields must be constant for a given SplitEvaluator.- 指定者:
getKeyNames
在接口中SplitEvaluator
- 返回:
- an array containing the name of each key column
-
getKey
Gets the key describing the current SplitEvaluator. For example This may contain the name of the classifier used for classifier predictive evaluation. The number of key fields must be constant for a given SplitEvaluator.- 指定者:
getKey
在接口中SplitEvaluator
- 返回:
- an array of objects containing the key.
-
getResultTypes
Gets the data types of each of the result columns produced for a single run. The number of result fields must be constant for a given SplitEvaluator.- 指定者:
getResultTypes
在接口中SplitEvaluator
- 返回:
- an array containing objects of the type of each result column. The objects should be Strings, or Doubles.
-
getResultNames
Gets the names of each of the result columns produced for a single run. The number of result fields must be constant for a given SplitEvaluator.- 指定者:
getResultNames
在接口中SplitEvaluator
- 返回:
- an array containing the name of each result column
-
getResult
Gets the results for the supplied train and test datasets. Now performs a deep copy of the classifier before it is built and evaluated (just in case the classifier is not initialized properly in buildClassifier()).- 指定者:
getResult
在接口中SplitEvaluator
- 参数:
train
- the training Instances.test
- the testing Instances.- 返回:
- the results stored in an array. The objects stored in the array may be Strings, Doubles, or null (for the missing value).
- 抛出:
Exception
- if a problem occurs while getting the results
-
classifierTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getClassifier
Get the value of Classifier.- 返回:
- Value of Classifier.
-
setClassifier
Sets the classifier.- 参数:
newClassifier
- the new classifier to use.
-
getClassForIRStatistics
public int getClassForIRStatistics()Get the value of ClassForIRStatistics.- 返回:
- Value of ClassForIRStatistics.
-
setClassForIRStatistics
public void setClassForIRStatistics(int v) Set the value of ClassForIRStatistics.- 参数:
v
- Value to assign to ClassForIRStatistics.
-
getAttributeID
public int getAttributeID()Get the index of Attibute Identifying the instances- 返回:
- index of outputed Attribute.
-
setAttributeID
public void setAttributeID(int v) Set the index of Attibute Identifying the instances- 参数:
v
- index the attribute to output
-
getPredTargetColumn
public boolean getPredTargetColumn()- 返回:
- true if the prediction and target columns must be outputed.
-
setPredTargetColumn
public void setPredTargetColumn(boolean v) Set the flag for prediction and target output.- 参数:
v
- true if the 2 columns have to be outputed. false otherwise.
-
setClassifierName
Set the Classifier to use, given it's class name. A new classifier will be instantiated.- 参数:
newClassifierName
- the Classifier class name.- 抛出:
Exception
- if the class name is invalid.
-
getRawResultOutput
Gets the raw output from the classifier- 指定者:
getRawResultOutput
在接口中SplitEvaluator
- 返回:
- the raw output from th,0e classifier
-
toString
Returns a text description of the split evaluator. -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-