|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectweka.classifiers.Classifier
weka.classifiers.meta.FilteredClassifier
Class for running an arbitrary classifier on data that has been passed through an arbitrary filter.
Valid options from the command line are:
-W classifierstring
Classifierstring should contain the full class name of a classifier
followed by options to the classifier.
-F filterstring
Filterstring should contain the full class name of a filter
followed by options to the filter.
| Field Summary |
| Fields inherited from interface weka.core.Drawable |
BayesNet, NOT_DRAWABLE, TREE |
| Constructor Summary | |
FilteredClassifier()
Default constructor specifying ZeroR as the classifier and AllFilter as the filter. |
|
FilteredClassifier(Classifier classifier,
Filter filter)
Constructor that specifies the subclassifier and filter to use. |
|
| Method Summary | |
void |
buildClassifier(Instances data)
Build the classifier on the filtered data. |
java.lang.String |
classifierTipText()
Returns the tip text for this property |
double[] |
distributionForInstance(Instance instance)
Classifies a given instance after filtering. |
java.lang.String |
filterTipText()
Returns the tip text for this property |
Classifier |
getClassifier()
Gets the classifier used. |
Filter |
getFilter()
Gets the filter used. |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier. |
java.lang.String |
globalInfo()
Returns a string describing this classifier |
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. |
void |
setClassifier(Classifier classifier)
Sets the classifier |
void |
setFilter(Filter filter)
Sets the filter |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
java.lang.String |
toString()
Output a representation of this classifier |
| 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 FilteredClassifier()
public FilteredClassifier(Classifier classifier,
Filter filter)
classifier - the Classifier to receive filtered instances.filter - the Filter that will process instances before
passing to the Classifier.| Method Detail |
public java.lang.String globalInfo()
public 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.util.Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class Classifier
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-W classifierstring
Classifierstring should contain the full class name of a classifier
followed by options to the classifier.
-F filterstring
Filterstring should contain the full class name of a filter
followed by options to the filter.
setOptions in interface OptionHandlersetOptions in class Classifieroptions - 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 Classifierpublic java.lang.String classifierTipText()
public void setClassifier(Classifier classifier)
classifier - the classifier with all options set.public Classifier getClassifier()
public java.lang.String filterTipText()
public void setFilter(Filter filter)
filter - the filter with all options set.public Filter getFilter()
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 java.lang.String toString()
public 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 | ||||||||||