public class LogisticBase extends AbstractClassifier implements WeightedInstancesHandler
-D If set, classifier is run in debug mode and may output additional info to the console
BATCH_SIZE_DEFAULT, NUM_DECIMAL_PLACES_DEFAULT| Constructor and Description |
|---|
LogisticBase()
Constructor that creates LogisticBase object with standard options.
|
LogisticBase(int numBoostingIterations,
boolean useCrossValidation,
boolean errorOnProbabilities)
Constructor to create LogisticBase object.
|
| Modifier and Type | Method and Description |
|---|---|
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).
|
java.lang.String |
getRevision()
Returns the revision string.
|
boolean |
getUseAIC()
Get the value of useAIC.
|
int[][] |
getUsedAttributes()
Returns an array of the indices of the attributes used in the logistic
model.
|
double |
getWeightTrimBeta()
Get the value of weightTrimBeta.
|
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".
|
void |
setUseAIC(boolean c)
Set the value of useAIC.
|
void |
setWeightTrimBeta(double w)
Sets the option "weightTrimBeta".
|
java.lang.String |
toString()
Returns a description of the logistic model (i.e., attributes and
coefficients).
|
batchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getCapabilities, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, getOptions, implementsMoreEfficientBatchPrediction, listOptions, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces, setOptionsequals, getClass, hashCode, notify, notifyAll, wait, wait, waitmakeCopypublic 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 LogitBoostpublic void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier in interface Classifierdata - the training datajava.lang.Exception - if something goes wrongpublic int[][] getUsedAttributes()
public int getNumRegressions()
public double getWeightTrimBeta()
public boolean getUseAIC()
public void setMaxIterations(int maxIterations)
maxIterations - the maximum iterationspublic void setHeuristicStop(int heuristicStop)
heuristicStop - the heuristic stop to usepublic void setWeightTrimBeta(double w)
public void setUseAIC(boolean c)
c - Value to assign to useAIC.public int getMaxIterations()
public double percentAttributesUsed()
public java.lang.String toString()
toString in class java.lang.Objectpublic double[] distributionForInstance(Instance instance) throws java.lang.Exception
distributionForInstance in interface ClassifierdistributionForInstance in class AbstractClassifierinstance - the instance to compute the distribution forjava.lang.Exception - if distribution can't be computed successfullypublic void cleanup()
public java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class AbstractClassifier