|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.Classifier
weka.classifiers.SingleClassifierEnhancer
weka.classifiers.meta.AttributeSelectedClassifier
public class AttributeSelectedClassifier
Class for running an arbitrary classifier on data that has been reduced through attribute selection.
Valid options from the command line are:
-W classifierstring
Classifierstring should contain the full class name of a classifier.
Any options for the classifier should appear at the end of the command line
following a "--".
.
-E evaluatorstring
Evaluatorstring should contain the full class name of an attribute
evaluator followed by any options.
(required).
-S searchstring
Searchstring should contain the full class name of a search method
followed by any options.
(required).
| Field Summary |
|---|
| Fields inherited from interface weka.core.Drawable |
|---|
BayesNet, NOT_DRAWABLE, TREE |
| Constructor Summary | |
|---|---|
AttributeSelectedClassifier()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
buildClassifier(Instances data)
Build the classifier on the dimensionally reduced data. |
double[] |
distributionForInstance(Instance instance)
Classifies a given instance after attribute selection |
java.util.Enumeration |
enumerateMeasures()
Returns an enumeration of the additional measure names |
java.lang.String |
evaluatorTipText()
Returns the tip text for this property |
ASEvaluation |
getEvaluator()
Gets the attribute evaluator used |
double |
getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier. |
ASSearch |
getSearch()
Gets the search method used |
java.lang.String |
globalInfo()
Returns a string describing this search method |
java.lang.String |
graph()
Returns graph describing the classifier (if possible). |
int |
graphType()
Returns the type of graph this classifier represents. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
double |
measureNumAttributesSelected()
Additional measure --- number of attributes selected |
double |
measureSelectionTime()
Additional measure --- time taken (milliseconds) to select the attributes |
double |
measureTime()
Additional measure --- time taken (milliseconds) to select attributes and build the classifier |
java.lang.String |
searchTipText()
Returns the tip text for this property |
void |
setEvaluator(ASEvaluation evaluator)
Sets the attribute evaluator |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setSearch(ASSearch search)
Sets the search method |
java.lang.String |
toString()
Output a representation of this classifier |
| Methods inherited from class weka.classifiers.SingleClassifierEnhancer |
|---|
classifierTipText, getClassifier, setClassifier |
| Methods inherited from class weka.classifiers.Classifier |
|---|
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AttributeSelectedClassifier()
| Method Detail |
|---|
public java.lang.String globalInfo()
public java.util.Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class SingleClassifierEnhancer
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-W classifierstring
Classifierstring should contain the full class name of a classifier.
Any options for the classifier should appear at the end of the command line
following a "--".
-E evaluatorstring
Evaluatorstring should contain the full class name of an attribute
evaluator followed by any options.
(required).
-S searchstring
Searchstring should contain the full class name of a search method
followed by any options.
(required).
setOptions in interface OptionHandlersetOptions in class SingleClassifierEnhanceroptions - 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 OptionHandlergetOptions in class SingleClassifierEnhancerpublic java.lang.String evaluatorTipText()
public void setEvaluator(ASEvaluation evaluator)
evaluator - the evaluator with all options set.public ASEvaluation getEvaluator()
public java.lang.String searchTipText()
public void setSearch(ASSearch search)
search - the search method with all options set.public ASSearch getSearch()
public void buildClassifier(Instances data)
throws java.lang.Exception
buildClassifier in class Classifierdata - the training data
java.lang.Exception - if the classifier could not be built successfully
public double[] distributionForInstance(Instance instance)
throws java.lang.Exception
distributionForInstance in class Classifierinstance - the instance to be classified
java.lang.Exception - if instance could not be classified
successfullypublic int graphType()
graphType in interface Drawable
public java.lang.String graph()
throws java.lang.Exception
graph in interface Drawablejava.lang.Exception - if the classifier cannot be graphedpublic java.lang.String toString()
toString in class java.lang.Objectpublic double measureNumAttributesSelected()
public double measureSelectionTime()
public double measureTime()
public java.util.Enumeration enumerateMeasures()
enumerateMeasures in interface AdditionalMeasureProducerpublic double getMeasure(java.lang.String additionalMeasureName)
getMeasure in interface AdditionalMeasureProducermeasureName - the name of the measure to query for its value
java.lang.IllegalArgumentException - if the named measure is not supportedpublic static void main(java.lang.String[] argv)
argv - should contain the following arguments:
-t training file [-T test file] [-c class index]
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||