|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.Classifier
weka.classifiers.DistributionClassifier
weka.classifiers.functions.Logistic
Implements linear logistic regression using LogitBoost and LinearRegression.
Missing values are replaced using ReplaceMissingValues, and nominal attributes are transformed into numeric attributes using NominalToBinary.
-P precision
Set the precision of stopping criterion based on average loglikelihood.
(default 1.0e-13)
-R ridge
Set the ridge parameter for the linear regression models.
(default 1.0e-8)
-M num
Set the maximum number of iterations.
(default 200)
Constructor Summary | |
Logistic()
|
Method Summary | |
void |
buildClassifier(Instances data)
Builds the model. |
double[] |
distributionForInstance(Instance inst)
Classifies an instance. |
int |
getMaxIts()
Get the value of MaxIts. |
java.lang.String[] |
getOptions()
Gets the current settings of the classifier. |
double |
getPrecision()
Gets the precision of stopping criterion in Newton method. |
double |
getRidge()
Gets the ridge parameter. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
void |
setMaxIts(int newMaxIts)
Set the value of MaxIts. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setPrecision(double precision)
Sets the precision of stopping criterion in Newton method. |
void |
setRidge(double ridge)
Sets the ridge parameter. |
java.lang.String |
toString()
Prints the model. |
Methods inherited from class weka.classifiers.DistributionClassifier |
calculateEntropy, calculateLabeledInstanceMargin, calculateMargin, classifyInstance |
Methods inherited from class weka.classifiers.Classifier |
forName, makeCopies |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Logistic()
Method Detail |
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-P precision
Set the precision of stopping criterion based on average loglikelihood.
(default 1.0e-13)
-R ridge
Set the ridge parameter for the linear regression models.
(default 1.0e-8)
-M num
Set the maximum number of iterations.
(default 200)
setOptions
in interface OptionHandler
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
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 the classifier has not been
generated successfullypublic double[] distributionForInstance(Instance inst) throws java.lang.Exception
distributionForInstance
in class DistributionClassifier
inst
- the instance to be classified
java.lang.Exception
- if distribution could not be
computed successfullypublic java.lang.String toString()
public int getMaxIts()
public void setMaxIts(int newMaxIts)
newMaxIts
- Value to assign to MaxIts.public void setPrecision(double precision)
precision
- the precisionpublic double getPrecision()
public void setRidge(double ridge)
ridge
- the ridgepublic double getRidge()
public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |