|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.AbstractClassifier
weka.classifiers.trees.DecisionStump
public class DecisionStump
Class for building and using a decision stump. Usually used in conjunction with a boosting algorithm. Does regression (based on mean-squared error) or classification (based on entropy). Missing is treated as a separate value.
Typical usage:
java weka.classifiers.meta.LogitBoost -I 100 -W weka.classifiers.trees.DecisionStump
-t training_data
Valid options are:
-D If set, classifier is run in debug mode and may output additional info to the console
| Constructor Summary | |
|---|---|
DecisionStump()
|
|
| Method Summary | |
|---|---|
void |
buildClassifier(Instances instances)
Generates the classifier. |
double[] |
distributionForInstance(Instance instance)
Calculates the class membership probabilities for the given test instance. |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
String |
getRevision()
Returns the revision string. |
String |
globalInfo()
Returns a string describing classifier |
static void |
main(String[] argv)
Main method for testing this class. |
String |
toSource(String className)
Returns the decision tree as Java source code. |
String |
toString()
Returns a description of the classifier. |
| Methods inherited from class weka.classifiers.AbstractClassifier |
|---|
classifyInstance, debugTipText, forName, getDebug, getOptions, listOptions, makeCopies, makeCopy, runClassifier, setDebug, setOptions |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DecisionStump()
| Method Detail |
|---|
public String globalInfo()
public Capabilities getCapabilities()
getCapabilities in interface ClassifiergetCapabilities in interface CapabilitiesHandlergetCapabilities in class AbstractClassifierCapabilities
public void buildClassifier(Instances instances)
throws Exception
buildClassifier in interface Classifierinstances - set of instances serving as training data
Exception - if the classifier has not been generated successfully
public double[] distributionForInstance(Instance instance)
throws Exception
distributionForInstance in interface ClassifierdistributionForInstance in class AbstractClassifierinstance - the instance to be classified
Exception - if distribution can't be computed
public String toSource(String className)
throws Exception
toSource in interface SourcableclassName - the classname of the generated code
Exception - if something goes wrongpublic String toString()
toString in class Objectpublic String getRevision()
getRevision in interface RevisionHandlergetRevision in class AbstractClassifierpublic static void main(String[] argv)
argv - the options
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||