public class Logistic extends AbstractClassifier implements OptionHandler, WeightedInstancesHandler, TechnicalInformationHandler
@article{leCessie1992,
author = {le Cessie, S. and van Houwelingen, J.C.},
journal = {Applied Statistics},
number = {1},
pages = {191-201},
title = {Ridge Estimators in Logistic Regression},
volume = {41},
year = {1992}
}
Valid options are:
-D Turn on debugging output.
-R <ridge> Set the ridge in the log-likelihood.
-M <number> Set the maximum number of iterations (default -1, until convergence).
| Constructor and Description |
|---|
Logistic() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildClassifier(Instances train)
Builds the classifier
|
double[][] |
coefficients()
Returns the coefficients for this logistic model.
|
String |
debugTipText()
Returns the tip text for this property
|
double[] |
distributionForInstance(Instance instance)
Computes the distribution for a given instance
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
boolean |
getDebug()
Gets whether debugging output will be printed.
|
int |
getMaxIts()
Get the value of MaxIts.
|
String[] |
getOptions()
Gets the current settings of the classifier.
|
String |
getRevision()
Returns the revision string.
|
double |
getRidge()
Gets the ridge in the log-likelihood.
|
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing
detailed information about the technical background of this class,
e.g., paper reference or book this class is based on.
|
boolean |
getUseConjugateGradientDescent()
Gets whether to use conjugate gradient descent rather than BFGS updates.
|
String |
globalInfo()
Returns a string describing this classifier
|
Enumeration |
listOptions()
Returns an enumeration describing the available options
|
static void |
main(String[] argv)
Main method for testing this class.
|
String |
maxItsTipText()
Returns the tip text for this property
|
String |
ridgeTipText()
Returns the tip text for this property
|
void |
setDebug(boolean debug)
Sets whether debugging output will be printed.
|
void |
setMaxIts(int newMaxIts)
Set the value of MaxIts.
|
void |
setOptions(String[] options)
Parses a given list of options.
|
void |
setRidge(double ridge)
Sets the ridge in the log-likelihood.
|
void |
setUseConjugateGradientDescent(boolean useConjugateGradientDescent)
Sets whether conjugate gradient descent is used.
|
String |
toString()
Gets a string describing the classifier.
|
String |
useConjugateGradientDescentTipText()
Returns the tip text for this property
|
classifyInstance, forName, makeCopies, makeCopy, runClassifierpublic String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class AbstractClassifierpublic void setOptions(String[] options) throws Exception
-D Turn on debugging output.
-R <ridge> Set the ridge in the log-likelihood.
-M <number> Set the maximum number of iterations (default -1, until convergence).
setOptions in interface OptionHandlersetOptions in class AbstractClassifieroptions - the list of options as an array of stringsException - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class AbstractClassifierpublic String debugTipText()
debugTipText in class AbstractClassifierpublic void setDebug(boolean debug)
setDebug in class AbstractClassifierdebug - true if debugging output should be printedpublic boolean getDebug()
getDebug in class AbstractClassifierpublic String useConjugateGradientDescentTipText()
public void setUseConjugateGradientDescent(boolean useConjugateGradientDescent)
useConjugateGradientDescent - true if CGD is to be used.public boolean getUseConjugateGradientDescent()
public String ridgeTipText()
public void setRidge(double ridge)
ridge - the ridgepublic double getRidge()
public String maxItsTipText()
public int getMaxIts()
public void setMaxIts(int newMaxIts)
newMaxIts - Value to assign to MaxIts.public Capabilities getCapabilities()
getCapabilities in interface ClassifiergetCapabilities in interface CapabilitiesHandlergetCapabilities in class AbstractClassifierCapabilitiespublic void buildClassifier(Instances train) throws Exception
buildClassifier in interface Classifiertrain - the training data to be used for generating the
boosted classifier.Exception - if the classifier could not be built successfullypublic double[] distributionForInstance(Instance instance) throws Exception
distributionForInstance in interface ClassifierdistributionForInstance in class AbstractClassifierinstance - the instance for which distribution is computedException - if the distribution can't be computed successfullypublic double[][] coefficients()
public String toString()
public String getRevision()
getRevision in interface RevisionHandlergetRevision in class AbstractClassifierpublic static void main(String[] argv)
argv - should contain the command line arguments to the
scheme (see Evaluation)Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.