|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.Classifier | +--weka.classifiers.trees.LMT
Class for "logistic model tree" classifier. For more information, see master thesis "Logistic Model Trees" (Niels Landwehr, 2003)
Valid options are:
-B
Binary splits (convert nominal attributes to binary ones).
-R
Split on residuals instead of class values
-C
Use cross-validation for boosting at all nodes (i.e., disable heuristic)
-P
Use error on probabilities instead of misclassification error for
stopping criterion of LogitBoost.
-I iterations
Set fixed number of iterations for LogitBoost (instead of using cross-validation).
-M numInstances
Set minimum number of instances at which a node can be split (default 15)
Field Summary |
Fields inherited from interface weka.core.Drawable |
BayesNet, NOT_DRAWABLE, TREE |
Constructor Summary | |
LMT()
Creates an instance of LMT with standard options |
Method Summary | |
void |
buildClassifier(Instances data)
Builds the classifier. |
double |
classifyInstance(Instance instance)
Classifies an instance. |
java.lang.String |
convertNominalTipText()
Returns the tip text for this property |
double[] |
distributionForInstance(Instance instance)
Returns class probabilities for an instance. |
java.util.Enumeration |
enumerateMeasures()
Returns an enumeration of the additional measure names |
java.lang.String |
errorOnProbabilitiesTipText()
Returns the tip text for this property |
java.lang.String |
fastRegressionTipText()
Returns the tip text for this property |
boolean |
getConvertNominal()
Get the value of convertNominal. |
boolean |
getErrorOnProbabilities()
Get the value of errorOnProbabilities. |
boolean |
getFastRegression()
Get the value of fastRegression. |
double |
getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure |
int |
getMinNumInstances()
Get the value of minNumInstances. |
int |
getNumBoostingIterations()
Get the value of numBoostingIterations. |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier. |
boolean |
getSplitOnResiduals()
Get the value of splitOnResiduals. |
java.lang.String |
globalInfo()
Returns a string describing classifier |
java.lang.String |
graph()
Returns graph describing the tree. |
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 |
int |
measureNumLeaves()
Returns the number of leaves in the tree |
int |
measureTreeSize()
Returns the size of the tree |
java.lang.String |
minNumInstancesTipText()
Returns the tip text for this property |
java.lang.String |
numBoostingIterationsTipText()
Returns the tip text for this property |
void |
setConvertNominal(boolean c)
Set the value of convertNominal. |
void |
setErrorOnProbabilities(boolean c)
Set the value of errorOnProbabilities. |
void |
setFastRegression(boolean c)
Set the value of fastRegression. |
void |
setMinNumInstances(int c)
Set the value of minNumInstances. |
void |
setNumBoostingIterations(int c)
Set the value of numBoostingIterations. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setSplitOnResiduals(boolean c)
Set the value of splitOnResiduals. |
java.lang.String |
splitOnResidualsTipText()
Returns the tip text for this property |
java.lang.String |
toString()
Returns a description of the classifier. |
Methods inherited from class weka.classifiers.Classifier |
debugTipText, forName, getDebug, makeCopies, setDebug |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LMT()
Method Detail |
public void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier
in class Classifier
data
- set of instances serving as training data
java.lang.Exception
- if classifier can't be built successfullypublic double[] distributionForInstance(Instance instance) throws java.lang.Exception
distributionForInstance
in class Classifier
instance
- the instance to be classified
java.lang.Exception
- if distribution can't be computed successfullypublic double classifyInstance(Instance instance) throws java.lang.Exception
classifyInstance
in class Classifier
instance
- the instance to be classified
java.lang.Exception
- if instance can't be classified successfullypublic java.lang.String toString()
toString
in class java.lang.Object
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class Classifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface OptionHandler
setOptions
in class Classifier
options
- 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 OptionHandler
getOptions
in class Classifier
public boolean getConvertNominal()
public boolean getSplitOnResiduals()
public boolean getFastRegression()
public boolean getErrorOnProbabilities()
public int getNumBoostingIterations()
public int getMinNumInstances()
public void setConvertNominal(boolean c)
c
- Value to assign to convertNominal.public void setSplitOnResiduals(boolean c)
c
- Value to assign to splitOnResiduals.public void setFastRegression(boolean c)
c
- Value to assign to fastRegression.public void setErrorOnProbabilities(boolean c)
c
- Value to assign to errorOnProbabilities.public void setNumBoostingIterations(int c)
c
- Value to assign to numBoostingIterations.public void setMinNumInstances(int c)
c
- Value to assign to minNumInstances.public int graphType()
graphType
in interface Drawable
public java.lang.String graph() throws java.lang.Exception
graph
in interface Drawable
java.lang.Exception
- if graph can't be computedpublic int measureTreeSize()
public int measureNumLeaves()
public java.util.Enumeration enumerateMeasures()
enumerateMeasures
in interface AdditionalMeasureProducer
public double getMeasure(java.lang.String additionalMeasureName)
getMeasure
in interface AdditionalMeasureProducer
additionalMeasureName
- the name of the measure to query for its value
java.lang.IllegalArgumentException
- if the named measure is not supportedpublic java.lang.String globalInfo()
public java.lang.String convertNominalTipText()
public java.lang.String splitOnResidualsTipText()
public java.lang.String fastRegressionTipText()
public java.lang.String errorOnProbabilitiesTipText()
public java.lang.String numBoostingIterationsTipText()
public java.lang.String minNumInstancesTipText()
public static void main(java.lang.String[] argv) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London