|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.AbstractClassifier
weka.classifiers.SingleClassifierEnhancer
weka.classifiers.meta.FilteredClassifier
public class FilteredClassifier
Class for running an arbitrary classifier on data that has been passed through an arbitrary filter. Like the classifier, the structure of the filter is based exclusively on the training data and test instances will be processed by the filter without changing their structure.
Valid options are:-F <filter specification> Full class name of filter to use, followed by filter options. eg: "weka.filters.unsupervised.attribute.Remove -V -R 1,2"
-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of base classifier. (default: weka.classifiers.trees.J48)
Options specific to classifier weka.classifiers.trees.J48:
-U Use unpruned tree.
-C <pruning confidence> Set confidence threshold for pruning. (default 0.25)
-M <minimum number of instances> Set minimum number of instances per leaf. (default 2)
-R Use reduced error pruning.
-N <number of folds> Set number of folds for reduced error pruning. One fold is used as pruning set. (default 3)
-B Use binary splits only.
-S Don't perform subtree raising.
-L Do not clean up after the tree has been built.
-A Laplace smoothing for predicted probabilities.
-Q <seed> Seed for random data shuffling (default 1).
| Field Summary |
|---|
| Fields inherited from interface weka.core.Drawable |
|---|
BayesNet, Newick, NOT_DRAWABLE, TREE |
| Constructor Summary | |
|---|---|
FilteredClassifier()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
buildClassifier(Instances data)
Build the classifier on the filtered data. |
double[] |
distributionForInstance(Instance instance)
Classifies a given instance after filtering. |
String |
filterTipText()
Returns the tip text for this property |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
Filter |
getFilter()
Gets the filter used. |
String[] |
getOptions()
Gets the current settings of the Classifier. |
String |
getRevision()
Returns the revision string. |
String |
globalInfo()
Returns a string describing this classifier |
String |
graph()
Returns graph describing the classifier (if possible). |
int |
graphType()
Returns the type of graph this classifier represents. |
Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(String[] argv)
Main method for testing this class. |
void |
setFilter(Filter filter)
Sets the filter |
void |
setOptions(String[] options)
Parses a given list of options. |
String |
toString()
Output a representation of this classifier |
| Methods inherited from class weka.classifiers.SingleClassifierEnhancer |
|---|
classifierTipText, getClassifier, setClassifier |
| Methods inherited from class weka.classifiers.AbstractClassifier |
|---|
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, runClassifier, setDebug |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FilteredClassifier()
| Method Detail |
|---|
public String globalInfo()
public int graphType()
graphType in interface Drawable
public String graph()
throws Exception
graph in interface DrawableException - if the classifier cannot be graphedpublic Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class SingleClassifierEnhancer
public void setOptions(String[] options)
throws Exception
-F <filter specification> Full class name of filter to use, followed by filter options. eg: "weka.filters.unsupervised.attribute.Remove -V -R 1,2"
-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of base classifier. (default: weka.classifiers.trees.J48)
Options specific to classifier weka.classifiers.trees.J48:
-U Use unpruned tree.
-C <pruning confidence> Set confidence threshold for pruning. (default 0.25)
-M <minimum number of instances> Set minimum number of instances per leaf. (default 2)
-R Use reduced error pruning.
-N <number of folds> Set number of folds for reduced error pruning. One fold is used as pruning set. (default 3)
-B Use binary splits only.
-S Don't perform subtree raising.
-L Do not clean up after the tree has been built.
-A Laplace smoothing for predicted probabilities.
-Q <seed> Seed for random data shuffling (default 1).
setOptions in interface OptionHandlersetOptions in class SingleClassifierEnhanceroptions - the list of options as an array of strings
Exception - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class SingleClassifierEnhancerpublic String filterTipText()
public void setFilter(Filter filter)
filter - the filter with all options set.public Filter getFilter()
public Capabilities getCapabilities()
getCapabilities in interface ClassifiergetCapabilities in interface CapabilitiesHandlergetCapabilities in class SingleClassifierEnhancerCapabilities
public void buildClassifier(Instances data)
throws Exception
buildClassifier in interface Classifierdata - the training data
Exception - if the classifier could not be built successfully
public double[] distributionForInstance(Instance instance)
throws Exception
distributionForInstance in interface ClassifierdistributionForInstance in class AbstractClassifierinstance - the instance to be classified
Exception - if instance could not be classified
successfullypublic String toString()
toString in class Objectpublic String getRevision()
getRevision in interface RevisionHandlergetRevision in class AbstractClassifierpublic static void main(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 | |||||||||