public class KernelLogisticRegression extends RandomizableClassifier
-S <num> Random number seed. (default 1)
-D If set, classifier is run in debug mode and may output additional info to the console
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
-L <double> The lambda penalty parameter. (default 0.01)
-G Use conjugate gradient descent instead of BFGS.
-P <int> The size of the thread pool, for example, the number of cores in the CPU. (default 1)
-E <int> The number of threads to use, which should be >= size of thread pool. (default 1)
Options specific to kernel weka.classifiers.functions.supportVector.PolyKernel:
-D Enables debugging output (if available) to be printed. (default: off)
-no-checks Turns off all checks - use with caution! (default: checks on)
-C <num> The size of the cache (a prime number), 0 for full cache and -1 to turn it off. (default: 250007)
-E <num> The Exponent to use. (default: 1.0)
-L Use lower-order terms. (default: no)
Constructor and Description |
---|
KernelLogisticRegression() |
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances data)
Method for building the classifier from training data.
|
double[] |
distributionForInstance(Instance inst)
Method for applying the classifier to a test instance.
|
Capabilities |
getCapabilities()
Returns capabilities of the classifier (i.e.
|
Kernel |
getKernel()
Returns the kernel to use.
|
double |
getLambda()
Get the value of lambda.
|
int |
getNumThreads()
Gets the number of threads.
|
java.lang.String[] |
getOptions()
Gets the current settings of the classifier.
|
int |
getPoolSize()
Gets the number of threads.
|
java.lang.String |
getRevision()
Need to implement this as well....
|
boolean |
getUseCGD()
Gets whether to use CGD.
|
java.lang.String |
globalInfo()
Returns a string describing this classifier
|
java.lang.String |
kernelTipText()
Returns the tip text for this property
|
java.lang.String |
lambdaTipText()
Returns the tip text for this property
|
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(java.lang.String[] args)
The main method for running this class from the command-line.
|
java.lang.String |
numThreadsTipText() |
java.lang.String |
poolSizeTipText() |
void |
setKernel(Kernel value)
Sets the kernel to use.
|
void |
setLambda(double v)
Set the value of lambda.
|
void |
setNumThreads(int nT)
Sets the number of threads
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setPoolSize(int nT)
Sets the number of threads
|
void |
setUseCGD(boolean newUseCGD)
Sets whether to use CGD.
|
java.lang.String |
toString()
Outputs description of classifier as a string.
|
java.lang.String |
useCGDTipText() |
getSeed, seedTipText, setSeed
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, runClassifier, setDebug
public java.lang.String globalInfo()
public Capabilities getCapabilities()
getCapabilities
in interface Classifier
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class AbstractClassifier
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class RandomizableClassifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-S <num> Random number seed. (default 1)
-D If set, classifier is run in debug mode and may output additional info to the console
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
-L <double> The lambda penalty parameter. (default 0.01)
-G Use conjugate gradient descent instead of BFGS.
-P <int> The size of the thread pool, for example, the number of cores in the CPU. (default 1)
-E <int> The number of threads to use, which should be >= size of thread pool. (default 1)
Options specific to kernel weka.classifiers.functions.supportVector.PolyKernel:
-D Enables debugging output (if available) to be printed. (default: off)
-no-checks Turns off all checks - use with caution! (default: checks on)
-C <num> The size of the cache (a prime number), 0 for full cache and -1 to turn it off. (default: 250007)
-E <num> The Exponent to use. (default: 1.0)
-L Use lower-order terms. (default: no)
setOptions
in interface OptionHandler
setOptions
in class RandomizableClassifier
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class RandomizableClassifier
public java.lang.String numThreadsTipText()
public int getNumThreads()
public void setNumThreads(int nT)
public java.lang.String poolSizeTipText()
public int getPoolSize()
public void setPoolSize(int nT)
public java.lang.String lambdaTipText()
public double getLambda()
public void setLambda(double v)
v
- Value to assign to lambda.public java.lang.String kernelTipText()
public void setKernel(Kernel value)
public Kernel getKernel()
public java.lang.String useCGDTipText()
public boolean getUseCGD()
public void setUseCGD(boolean newUseCGD)
public void buildClassifier(Instances data) throws java.lang.Exception
java.lang.Exception
public double[] distributionForInstance(Instance inst) throws java.lang.Exception
distributionForInstance
in interface Classifier
distributionForInstance
in class AbstractClassifier
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class AbstractClassifier
public static void main(java.lang.String[] args)