|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.attributeSelection.ASEvaluation
weka.attributeSelection.OneRAttributeEval
public class OneRAttributeEval
OneRAttributeEval :
Evaluates the worth of an attribute by using the OneR 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 <minimum bucket size> Minimum number of objects in a bucket (passed on to OneR, default = 6)
Constructor Summary | |
---|---|
OneRAttributeEval()
Constructor |
Method Summary | |
---|---|
void |
buildEvaluator(Instances data)
Initializes a OneRAttribute attribute evaluator. |
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. |
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 |
int |
getMinimumBucketSize()
Get the minimum bucket size used by oneR |
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 testing this class. |
java.lang.String |
minimumBucketSizeTipText()
Returns a string for this option suitable for display in the gui as a tip text |
java.lang.String |
seedTipText()
Returns a string for this option suitable for display in the gui as a tip text |
void |
setEvalUsingTrainingData(boolean e)
Use the training data to evaluate attributes rather than cross validation |
void |
setFolds(int folds)
Set the number of folds to use for cross validation |
void |
setMinimumBucketSize(int minB)
Set the minumum bucket size used by OneR |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setSeed(int seed)
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 OneRAttributeEval()
Method Detail |
---|
public java.lang.String globalInfo()
public java.lang.String seedTipText()
public void setSeed(int seed)
seed
- the seed to usepublic int getSeed()
int
valuepublic java.lang.String foldsTipText()
public void setFolds(int folds)
folds
- the number of foldspublic int getFolds()
public java.lang.String evalUsingTrainingDataTipText()
public void setEvalUsingTrainingData(boolean e)
e
- true if training data is to be used for evaluationpublic java.lang.String minimumBucketSizeTipText()
public void setMinimumBucketSize(int minB)
minB
- the minimum bucket size to usepublic int getMinimumBucketSize()
public boolean getEvalUsingTrainingData()
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 <minimum bucket size> Minimum number of objects in a bucket (passed on to OneR, default = 6)
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 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 |