public class KernelLogisticRegression
extends weka.classifiers.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(weka.core.Instances data)
Method for building the classifier from training data.
|
double[] |
distributionForInstance(weka.core.Instance inst)
Method for applying the classifier to a test instance.
|
weka.core.Capabilities |
getCapabilities()
Returns capabilities of the classifier (i.e.
|
weka.classifiers.functions.supportVector.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<weka.core.Option> |
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(weka.classifiers.functions.supportVector.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() |
batchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
public java.lang.String globalInfo()
public weka.core.Capabilities getCapabilities()
getCapabilities
in interface weka.classifiers.Classifier
getCapabilities
in interface weka.core.CapabilitiesHandler
getCapabilities
in class weka.classifiers.AbstractClassifier
public java.util.Enumeration<weka.core.Option> listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class weka.classifiers.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 weka.core.OptionHandler
setOptions
in class weka.classifiers.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 weka.core.OptionHandler
getOptions
in class weka.classifiers.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(weka.classifiers.functions.supportVector.Kernel value)
public weka.classifiers.functions.supportVector.Kernel getKernel()
public java.lang.String useCGDTipText()
public boolean getUseCGD()
public void setUseCGD(boolean newUseCGD)
public void buildClassifier(weka.core.Instances data) throws java.lang.Exception
java.lang.Exception
public double[] distributionForInstance(weka.core.Instance inst) throws java.lang.Exception
distributionForInstance
in interface weka.classifiers.Classifier
distributionForInstance
in class weka.classifiers.AbstractClassifier
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface weka.core.RevisionHandler
getRevision
in class weka.classifiers.AbstractClassifier
public static void main(java.lang.String[] args)