|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.attributeSelection.ASEvaluation
weka.attributeSelection.HoldOutSubsetEvaluator
weka.attributeSelection.ClassifierSubsetEval
public class ClassifierSubsetEval
Classifier subset evaluator:
Evaluates attribute subsets on training data or a seperate hold out testing set. Uses a classifier to estimate the 'merit' of a set of attributes.
-B <classifier> class name of the classifier to use for accuracy estimation. Place any classifier options LAST on the command line following a "--". eg.: -B weka.classifiers.bayes.NaiveBayes ... -- -K (default: weka.classifiers.rules.ZeroR)
-T Use the training data to estimate accuracy.
-H <filename> Name of the hold out/test set to estimate accuracy on.
Options specific to scheme weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the console
| Constructor Summary | |
|---|---|
ClassifierSubsetEval()
|
|
| Method Summary | |
|---|---|
void |
buildEvaluator(Instances data)
Generates a attribute evaluator. |
java.lang.String |
classifierTipText()
Returns the tip text for this property |
double |
evaluateSubset(java.util.BitSet subset)
Evaluates a subset of attributes |
double |
evaluateSubset(java.util.BitSet subset,
Instance holdOut,
boolean retrain)
Evaluates a subset of attributes with respect to a single instance. |
double |
evaluateSubset(java.util.BitSet subset,
Instances holdOut)
Evaluates a subset of attributes with respect to a set of instances. |
Capabilities |
getCapabilities()
Returns the capabilities of this evaluator. |
Classifier |
getClassifier()
Get the classifier used as the base learner. |
java.io.File |
getHoldOutFile()
Gets the file that holds hold out/test instances. |
java.lang.String[] |
getOptions()
Gets the current settings of ClassifierSubsetEval |
java.lang.String |
getRevision()
Returns the revision string. |
boolean |
getUseTraining()
Get if training data is to be used instead of hold out/test data |
java.lang.String |
globalInfo()
Returns a string describing this attribute evaluator |
java.lang.String |
holdOutFileTipText()
Returns the tip text for this property |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] args)
Main method for testing this class. |
void |
setClassifier(Classifier newClassifier)
Set the classifier to use for accuracy estimation |
void |
setHoldOutFile(java.io.File h)
Set the file that contains hold out/test instances |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setUseTraining(boolean t)
Set if training data is to be used instead of hold out/test data |
java.lang.String |
toString()
Returns a string describing classifierSubsetEval |
java.lang.String |
useTrainingTipText()
Returns the tip text for this property |
| 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 ClassifierSubsetEval()
| 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
-B <classifier> class name of the classifier to use for accuracy estimation. Place any classifier options LAST on the command line following a "--". eg.: -B weka.classifiers.bayes.NaiveBayes ... -- -K (default: weka.classifiers.rules.ZeroR)
-T Use the training data to estimate accuracy.
-H <filename> Name of the hold out/test set to estimate accuracy on.
Options specific to scheme weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the console
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 classifierTipText()
public void setClassifier(Classifier newClassifier)
newClassifier - the Classifier to use.public Classifier getClassifier()
public java.lang.String holdOutFileTipText()
public java.io.File getHoldOutFile()
public void setHoldOutFile(java.io.File h)
h - the hold out filepublic java.lang.String useTrainingTipText()
public boolean getUseTraining()
public void setUseTraining(boolean t)
t - true if training data is to be used instead of hold out datapublic java.lang.String[] getOptions()
getOptions in interface OptionHandlerpublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class ASEvaluationCapabilities
public void buildEvaluator(Instances data)
throws java.lang.Exception
buildEvaluator in class ASEvaluationdata - set of instances serving as training data
java.lang.Exception - if the evaluator has not been
generated successfully
public double evaluateSubset(java.util.BitSet subset)
throws java.lang.Exception
evaluateSubset in interface SubsetEvaluatorsubset - a bitset representing the attribute subset to be
evaluated
java.lang.Exception - if the subset could not be evaluated
public double evaluateSubset(java.util.BitSet subset,
Instances holdOut)
throws java.lang.Exception
evaluateSubset in class HoldOutSubsetEvaluatorsubset - a bitset representing the attribute subset to be
evaluatedholdOut - a set of instances (possibly seperate and distinct
from those use to build/train the evaluator) with which to
evaluate the merit of the subset
java.lang.Exception - if the subset cannot be evaluated
public double evaluateSubset(java.util.BitSet subset,
Instance holdOut,
boolean retrain)
throws java.lang.Exception
evaluateSubset in class HoldOutSubsetEvaluatorsubset - a bitset representing the attribute subset to be
evaluatedholdOut - a single instance (possibly not one of those used to
build/train the evaluator) with which to evaluate the merit of the subsetretrain - true if the classifier should be retrained with respect
to the new subset before testing on the holdOut instance.
java.lang.Exception - if the subset cannot be evaluatedpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class ASEvaluationpublic 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 | |||||||||