|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.experiment.ClassifierSplitEvaluator
public class ClassifierSplitEvaluator
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.
| Constructor Summary | |
|---|---|
ClassifierSplitEvaluator()
No args constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
classifierTipText()
Returns the tip text for this property |
java.util.Enumeration |
enumerateMeasures()
Returns an enumeration of any additional measure names that might be in the classifier |
int |
getAttributeID()
Get the index of Attibute Identifying the instances |
int |
getClassForIRStatistics()
Get the value of ClassForIRStatistics. |
Classifier |
getClassifier()
Get the value of Classifier. |
java.lang.Object[] |
getKey()
Gets the key describing the current SplitEvaluator. |
java.lang.String[] |
getKeyNames()
Gets the names of each of the key columns produced for a single run. |
java.lang.Object[] |
getKeyTypes()
Gets the data types of each of the key columns produced for a single run. |
double |
getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier. |
boolean |
getPredTargetColumn()
|
java.lang.String |
getRawResultOutput()
Gets the raw output from the classifier |
java.lang.Object[] |
getResult(Instances train,
Instances test)
Gets the results for the supplied train and test datasets. |
java.lang.String[] |
getResultNames()
Gets the names of each of the result columns produced for a single run. |
java.lang.Object[] |
getResultTypes()
Gets the data types of each of the result columns produced for a single run. |
java.lang.String |
getRevision()
Returns the revision string. |
java.lang.String |
globalInfo()
Returns a string describing this split evaluator |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options.. |
void |
setAdditionalMeasures(java.lang.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 instances |
void |
setClassForIRStatistics(int v)
Set the value of ClassForIRStatistics. |
void |
setClassifier(Classifier newClassifier)
Sets the classifier. |
void |
setClassifierName(java.lang.String newClassifierName)
Set the Classifier to use, given it's class name. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setPredTargetColumn(boolean v)
Set the flag for prediction and target output. |
java.lang.String |
toString()
Returns a text description of the split evaluator. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ClassifierSplitEvaluator()
| Method Detail |
|---|
public java.lang.String globalInfo()
public java.util.Enumeration listOptions()
listOptions in interface OptionHandler
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-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.
setOptions in interface OptionHandleroptions - the list of options as an array of strings
java.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlerpublic void setAdditionalMeasures(java.lang.String[] additionalMeasures)
setAdditionalMeasures in interface SplitEvaluatoradditionalMeasures - a list of method namespublic java.util.Enumeration enumerateMeasures()
enumerateMeasures in interface AdditionalMeasureProducerpublic double getMeasure(java.lang.String additionalMeasureName)
getMeasure in interface AdditionalMeasureProduceradditionalMeasureName - the name of the measure to query for its value
java.lang.IllegalArgumentException - if the named measure is not supportedpublic java.lang.Object[] getKeyTypes()
getKeyTypes in interface SplitEvaluatorpublic java.lang.String[] getKeyNames()
getKeyNames in interface SplitEvaluatorpublic java.lang.Object[] getKey()
getKey in interface SplitEvaluatorpublic java.lang.Object[] getResultTypes()
getResultTypes in interface SplitEvaluatorpublic java.lang.String[] getResultNames()
getResultNames in interface SplitEvaluator
public java.lang.Object[] getResult(Instances train,
Instances test)
throws java.lang.Exception
getResult in interface SplitEvaluatortrain - the training Instances.test - the testing Instances.
java.lang.Exception - if a problem occurs while getting the resultspublic java.lang.String classifierTipText()
public Classifier getClassifier()
public void setClassifier(Classifier newClassifier)
newClassifier - the new classifier to use.public int getClassForIRStatistics()
public void setClassForIRStatistics(int v)
v - Value to assign to ClassForIRStatistics.public int getAttributeID()
public void setAttributeID(int v)
v - index the attribute to outputpublic boolean getPredTargetColumn()
public void setPredTargetColumn(boolean v)
v - true if the 2 columns have to be outputed. false otherwise.
public void setClassifierName(java.lang.String newClassifierName)
throws java.lang.Exception
newClassifierName - the Classifier class name.
java.lang.Exception - if the class name is invalid.public java.lang.String getRawResultOutput()
getRawResultOutput in interface SplitEvaluatorpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getRevision()
getRevision in interface RevisionHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||