|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.attributeSelection.ASEvaluation
weka.attributeSelection.ClassifierAttributeEval
public class ClassifierAttributeEval
ClassifierAttributeEval :
Evaluates the worth of an attribute by using a user-specified classifier.
-S <seed> Random number seed for cross validation. (default = 1)
-F <folds> Number of folds for cross validation. (default = 10)
-D Use training data for evaluation rather than cross validaton.
-B <classname + options> Classifier to use. (default = OneR)
Constructor Summary | |
---|---|
ClassifierAttributeEval()
Constructor. |
Method Summary | |
---|---|
void |
buildEvaluator(Instances data)
Initializes a ClassifierAttribute attribute evaluator. |
java.lang.String |
classifierTipText()
Returns a string for this option suitable for display in the gui as a tip text. |
double |
evaluateAttribute(int attribute)
Evaluates an individual attribute by measuring the amount of information gained about the class given the attribute. |
java.lang.String |
evalUsingTrainingDataTipText()
Returns a string for this option suitable for display in the gui as a tip text. |
java.lang.String |
foldsTipText()
Returns a string for this option suitable for display in the gui as a tip text. |
Capabilities |
getCapabilities()
Returns the capabilities of this evaluator. |
Classifier |
getClassifier()
Returns the classifier to use for evaluating the attribute. |
boolean |
getEvalUsingTrainingData()
Returns true if the training data is to be used for evaluation. |
int |
getFolds()
Get the number of folds used for cross validation. |
java.lang.String[] |
getOptions()
returns the current setup. |
java.lang.String |
getRevision()
Returns the revision string. |
int |
getSeed()
Get the random number seed. |
java.lang.String |
globalInfo()
Returns a string describing this attribute evaluator. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] args)
Main method for executing this class. |
java.lang.String |
seedTipText()
Returns a string for this option suitable for display in the gui as a tip text. |
void |
setClassifier(Classifier value)
Set the classifier to use for evaluating the attribute. |
void |
setEvalUsingTrainingData(boolean value)
Use the training data to evaluate attributes rather than cross validation. |
void |
setFolds(int value)
Set the number of folds to use for cross validation. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setSeed(int value)
Set the random number seed for cross validation. |
java.lang.String |
toString()
Return a description of the evaluator. |
Methods inherited from class weka.attributeSelection.ASEvaluation |
---|
forName, makeCopies, postProcess |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClassifierAttributeEval()
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
-S <seed> Random number seed for cross validation. (default = 1)
-F <folds> Number of folds for cross validation. (default = 10)
-D Use training data for evaluation rather than cross validaton.
-B <classname + options> Classifier to use. (default = OneR)
setOptions
in interface OptionHandler
options
- 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 OptionHandler
public void setSeed(int value)
value
- the seed to usepublic int getSeed()
int
valuepublic java.lang.String seedTipText()
public void setFolds(int value)
value
- the number of foldspublic int getFolds()
public java.lang.String foldsTipText()
public void setEvalUsingTrainingData(boolean value)
value
- true if training data is to be used for evaluationpublic boolean getEvalUsingTrainingData()
public java.lang.String evalUsingTrainingDataTipText()
public void setClassifier(Classifier value)
value
- the classifier to usepublic Classifier getClassifier()
public java.lang.String classifierTipText()
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class ASEvaluation
Capabilities
public void buildEvaluator(Instances data) throws java.lang.Exception
buildEvaluator
in class ASEvaluation
data
- set of instances serving as training data
java.lang.Exception
- if the evaluator has not been generated successfullypublic double evaluateAttribute(int attribute) throws java.lang.Exception
evaluateAttribute
in interface AttributeEvaluator
attribute
- the index of the attribute to be evaluated
java.lang.Exception
- if the attribute could not be evaluatedpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class ASEvaluation
public static void main(java.lang.String[] args)
args
- the options
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |