|
|||||||||
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.LogisticBase
Base/helper class for building logistic regression models with the LogitBoost algorithm. Used for building logistic model trees (weka.classifiers.trees.lmt.LMT) and standalone logistic regression (weka.classifiers.functions.SimpleLogistic).
Constructor Summary | |
LogisticBase()
Constructor that creates LogisticBase object with standard options. |
|
LogisticBase(int numBoostingIterations,
boolean useCrossValidation,
boolean errorOnProbabilities)
Constructor to create LogisticBase object. |
Method Summary | |
void |
buildClassifier(Instances data)
Builds the logistic regression model usiing LogitBoost. |
void |
cleanup()
Cleanup in order to save memory. |
double[] |
distributionForInstance(Instance instance)
Returns class probabilities for an instance. |
int |
getMaxIterations()
Returns the maxIterations parameter. |
int |
getNumRegressions()
The number of LogitBoost iterations performed (= the number of simple regression functions fit). |
int[][] |
getUsedAttributes()
Returns an array of the indices of the attributes used in the logistic model. |
double |
percentAttributesUsed()
Returns the fraction of all attributes in the data that are used in the logistic model (in percent). |
void |
setHeuristicStop(int heuristicStop)
Sets the option "heuristicStop". |
void |
setMaxIterations(int maxIterations)
Sets the parameter "maxIterations". |
java.lang.String |
toString()
Returns a description of the logistic model (i.e., attributes and coefficients). |
Methods inherited from class weka.classifiers.Classifier |
classifyInstance, debugTipText, forName, getDebug, getOptions, listOptions, makeCopies, setDebug, setOptions |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LogisticBase()
public LogisticBase(int numBoostingIterations, boolean useCrossValidation, boolean errorOnProbabilities)
numBoostingIterations
- fixed number of iterations for LogitBoost (if negative, use cross-validation or
stopping criterion on the training data).useCrossValidation
- cross-validate number of LogitBoost iterations (if false, use stopping
criterion on the training data).errorOnProbabilities
- if true, use error on probabilities
instead of misclassification for stopping criterion of LogitBoostMethod Detail |
public void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier
in class Classifier
data
- the training data
java.lang.Exception
- if the classifier has not been
generated successfullypublic int[][] getUsedAttributes()
public int getNumRegressions()
public void setMaxIterations(int maxIterations)
public void setHeuristicStop(int heuristicStop)
public int getMaxIterations()
public double percentAttributesUsed()
public java.lang.String toString()
toString
in class java.lang.Object
public 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 void cleanup()
|
|||||||||
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