All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.experiment.ClassifierSplitEvaluator

java.lang.Object
    |
    +----weka.experiment.ClassifierSplitEvaluator

public class ClassifierSplitEvaluator
extends java.lang.Object
implements SplitEvaluator, OptionHandler, AdditionalMeasureProducer
A SplitEvaluator that produces results for a classification scheme on a nominal class attribute. -W classname
Specify the full class name of the classifier to evaluate.

-C class index
The index of the class for which IR statistics are to be output. (default 1)

Version:
$Revision: 1.14 $
Author:
Len Trigg (trigg@cs.waikato.ac.nz)

Constructor Index

 o ClassifierSplitEvaluator()
No args constructor.

Method Index

 o classifierTipText()
Returns the tip text for this property
 o enumerateMeasures()
Returns an enumeration of any additional measure names that might be in the classifier
 o getClassForIRStatistics()
Get the value of ClassForIRStatistics.
 o getClassifier()
Get the value of Classifier.
 o getKey()
Gets the key describing the current SplitEvaluator.
 o getKeyNames()
Gets the names of each of the key columns produced for a single run.
 o getKeyTypes()
Gets the data types of each of the key columns produced for a single run.
 o getMeasure(String)
Returns the value of the named measure
 o getOptions()
Gets the current settings of the Classifier.
 o getRawResultOutput()
Gets the raw output from the classifier
 o getResult(Instances, Instances)
Gets the results for the supplied train and test datasets.
 o getResultNames()
Gets the names of each of the result columns produced for a single run.
 o getResultTypes()
Gets the data types of each of the result columns produced for a single run.
 o globalInfo()
Returns a string describing this split evaluator
 o listOptions()
Returns an enumeration describing the available options.
 o setAdditionalMeasures(String[])
Set a list of method names for additional measures to look for in Classifiers.
 o setClassForIRStatistics(int)
Set the value of ClassForIRStatistics.
 o setClassifier(Classifier)
Sets the classifier.
 o setClassifierName(String)
Set the Classifier to use, given it's class name.
 o setOptions(String[])
Parses a given list of options.
 o toString()
Returns a text description of the split evaluator.

Constructor Detail

 o ClassifierSplitEvaluator
public ClassifierSplitEvaluator()
          No args constructor.

Method Detail

 o globalInfo
public java.lang.String globalInfo()
          Returns a string describing this split evaluator
Returns:
a description of the split evaluator suitable for displaying in the explorer/experimenter gui
 o listOptions
public java.util.Enumeration listOptions()
          Returns an enumeration describing the available options.
Returns:
an enumeration of all the available options
 o setOptions
public void setOptions(java.lang.String options[]) throws java.lang.Exception
          Parses a given list of options. Valid options are:

-W classname
Specify the full class name of the classifier to evaluate.

-C class index
The index of the class for which IR statistics are to be output. (default 1)

All option after -- will be passed to the classifier.

Parameters:
options - the list of options as an array of strings
Throws:
java.lang.Exception - if an option is not supported
 o getOptions
public java.lang.String[] getOptions()
          Gets the current settings of the Classifier.
Returns:
an array of strings suitable for passing to setOptions
 o setAdditionalMeasures
public void setAdditionalMeasures(java.lang.String additionalMeasures[])
          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.
Parameters:
additionalMeasures - a list of method names
 o enumerateMeasures
public java.util.Enumeration enumerateMeasures()
          Returns an enumeration of any additional measure names that might be in the classifier
Returns:
an enumeration of the measure names
 o getMeasure
public double getMeasure(java.lang.String additionalMeasureName)
          Returns the value of the named measure
Parameters:
measureName - the name of the measure to query for its value
Returns:
the value of the named measure
Throws:
java.lang.IllegalArgumentException - if the named measure is not supported
 o getKeyTypes
public java.lang.Object[] 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.
Returns:
an array containing objects of the type of each key column. The objects should be Strings, or Doubles.
 o getKeyNames
public java.lang.String[] 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.
Returns:
an array containing the name of each key column
 o getKey
public java.lang.Object[] 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.
Returns:
an array of objects containing the key.
 o getResultTypes
public java.lang.Object[] 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.
Returns:
an array containing objects of the type of each result column. The objects should be Strings, or Doubles.
 o getResultNames
public java.lang.String[] 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.
Returns:
an array containing the name of each result column
 o getResult
public java.lang.Object[] getResult(Instances train,
                          Instances test) throws java.lang.Exception
          Gets the results for the supplied train and test datasets.
Parameters:
train - the training Instances.
test - the testing Instances.
Returns:
the results stored in an array. The objects stored in the array may be Strings, Doubles, or null (for the missing value).
Throws:
java.lang.Exception - if a problem occurs while getting the results
 o classifierTipText
public java.lang.String classifierTipText()
          Returns the tip text for this property
Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o getClassifier
public Classifier getClassifier()
          Get the value of Classifier.
Returns:
Value of Classifier.
 o setClassifier
public void setClassifier(Classifier newClassifier)
          Sets the classifier.
Parameters:
newClassifier - the new classifier to use.
 o getClassForIRStatistics
public int getClassForIRStatistics()
          Get the value of ClassForIRStatistics.
Returns:
Value of ClassForIRStatistics.
 o setClassForIRStatistics
public void setClassForIRStatistics(int v)
          Set the value of ClassForIRStatistics.
Parameters:
v - Value to assign to ClassForIRStatistics.
 o setClassifierName
public void setClassifierName(java.lang.String newClassifierName) throws java.lang.Exception
          Set the Classifier to use, given it's class name. A new classifier will be instantiated.
Parameters:
newClassifier - the Classifier class name.
Throws:
java.lang.Exception - if the class name is invalid.
 o getRawResultOutput
public java.lang.String getRawResultOutput()
          Gets the raw output from the classifier
Returns:
the raw output from the classifier
 o toString
public java.lang.String toString()
          Returns a text description of the split evaluator.
Returns:
a text description of the split evaluator.
Overrides:
toString in class java.lang.Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home