public class SVMreg extends java.lang.Object implements WeightedInstancesHandler, AdditionalMeasureProducer, TechnicalInformationHandler
@inproceedings{Shevade1999, author = {S.K. Shevade and S.S. Keerthi and C. Bhattacharyya and K.R.K. Murthy}, booktitle = {IEEE Transactions on Neural Networks}, title = {Improvements to the SMO Algorithm for SVM Regression}, year = {1999}, PS = {http://guppy.mpe.nus.edu.sg/~mpessk/svm/ieee_smo_reg.ps.gz} } @techreport{Smola1998, author = {A.J. Smola and B. Schoelkopf}, note = {NeuroCOLT2 Technical Report NC2-TR-1998-030}, title = {A tutorial on support vector regression}, year = {1998} }Valid options are:
-C <double> The complexity constant C. (default 1)
-N Whether to 0=normalize/1=standardize/2=neither. (default 0=normalize)
-I <classname and parameters> Optimizer class used for solving quadratic optimization problem (default weka.classifiers.functions.supportVector.RegSMOImproved)
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
Options specific to optimizer ('-I') weka.classifiers.functions.supportVector.RegSMOImproved:
-T <double> The tolerance parameter for checking the stopping criterion. (default 0.001)
-V Use variant 1 of the algorithm when true, otherwise use variant 2. (default true)
-P <double> The epsilon for round-off error. (default 1.0e-12)
-L <double> The epsilon parameter in epsilon-insensitive loss function. (default 1.0e-3)
-W <double> The random number seed. (default 1)
Options specific to kernel ('-K') 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). (default: 250007)
-E <num> The Exponent to use. (default: 1.0)
-L Use lower-order terms. (default: no)
Modifier and Type | Field and Description |
---|---|
static int |
FILTER_NONE
The filter to apply to the training data: None
|
static int |
FILTER_NORMALIZE
The filter to apply to the training data: Normalzie
|
static int |
FILTER_STANDARDIZE
The filter to apply to the training data: Standardize
|
protected double |
m_C
capacity parameter
|
protected int |
m_filterType
Whether to normalize/standardize/neither
|
protected Kernel |
m_kernel
the configured kernel
|
protected boolean |
m_onlyNumeric
Only numeric attributes in the dataset?
|
protected RegOptimizer |
m_optimizer
contains the algorithm used for learning
|
protected double |
m_x0
coefficients used by normalization filter for doing its linear transformation
so that result = svmoutput * m_x1 + m_x0
|
protected double |
m_x1
coefficients used by normalization filter for doing its linear transformation
so that result = svmoutput * m_x1 + m_x0
|
static Tag[] |
TAGS_FILTER
The filter to apply to the training data
|
Constructor and Description |
---|
SVMreg() |
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances instances)
Method for building the classifier.
|
double |
classifyInstance(Instance instance)
Classifies the given instance using the linear regression function.
|
java.lang.String |
cTipText()
Returns the tip text for this property
|
java.util.Enumeration |
enumerateMeasures()
Returns an enumeration of the measure names.
|
java.lang.String |
filterTypeTipText()
Returns the tip text for this property
|
double |
getC()
Get the value of C.
|
SelectedTag |
getFilterType()
Gets how the training data will be transformed.
|
Kernel |
getKernel()
Returns the kernel to use
|
double |
getMeasure(java.lang.String measureName)
Returns the value of the named measure
|
RegOptimizer |
getRegOptimizer()
returns the learning algorithm
|
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.
|
java.lang.String |
globalInfo()
Returns a string describing classifier
|
java.lang.String |
kernelTipText()
Returns the tip text for this property
|
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
protected double |
measureCacheHits()
number of kernel cache hits used during learing
|
protected double |
measureKernelEvaluations()
number of kernel evaluations used in learing
|
java.lang.String |
regOptimizerTipText()
Returns the tip text for this property
|
void |
setC(double v)
Set the value of C.
|
void |
setFilterType(SelectedTag newType)
Sets how the training data will be transformed.
|
void |
setKernel(Kernel value)
sets the kernel to use
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setRegOptimizer(RegOptimizer regOptimizer)
sets the learning algorithm
|
java.lang.String |
toString()
Prints out the classifier.
|
public static final int FILTER_NORMALIZE
public static final int FILTER_STANDARDIZE
public static final int FILTER_NONE
public static final Tag[] TAGS_FILTER
protected int m_filterType
protected boolean m_onlyNumeric
protected double m_C
protected double m_x1
protected double m_x0
protected RegOptimizer m_optimizer
protected Kernel m_kernel
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public java.util.Enumeration listOptions()
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-C <double> The complexity constant C. (default 1)
-N Whether to 0=normalize/1=standardize/2=neither. (default 0=normalize)
-I <classname and parameters> Optimizer class used for solving quadratic optimization problem (default weka.classifiers.functions.supportVector.RegSMOImproved)
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
Options specific to optimizer ('-I') weka.classifiers.functions.supportVector.RegSMOImproved:
-T <double> The tolerance parameter for checking the stopping criterion. (default 0.001)
-V Use variant 1 of the algorithm when true, otherwise use variant 2. (default true)
-P <double> The epsilon for round-off error. (default 1.0e-12)
-L <double> The epsilon parameter in epsilon-insensitive loss function. (default 1.0e-3)
-W <double> The random number seed. (default 1)
Options specific to kernel ('-K') 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). (default: 250007)
-E <num> The Exponent to use. (default: 1.0)
-L Use lower-order terms. (default: no)
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic void buildClassifier(Instances instances) throws java.lang.Exception
instances
- the set of training instancesjava.lang.Exception
- if the classifier can't be built successfullypublic double classifyInstance(Instance instance) throws java.lang.Exception
instance
- the test instancejava.lang.Exception
- if classification can't be done successfullypublic java.lang.String regOptimizerTipText()
public void setRegOptimizer(RegOptimizer regOptimizer)
regOptimizer
- the learning algorithmpublic RegOptimizer getRegOptimizer()
public java.lang.String kernelTipText()
public void setKernel(Kernel value)
value
- the kernel to usepublic Kernel getKernel()
public java.lang.String cTipText()
public double getC()
public void setC(double v)
v
- Value to assign to C.public java.lang.String filterTypeTipText()
public SelectedTag getFilterType()
public void setFilterType(SelectedTag newType)
newType
- the new filtering modepublic java.lang.String toString()
toString
in class java.lang.Object
public java.util.Enumeration enumerateMeasures()
enumerateMeasures
in interface AdditionalMeasureProducer
public double getMeasure(java.lang.String measureName)
getMeasure
in interface AdditionalMeasureProducer
measureName
- the name of the measure to query for its valuejava.lang.IllegalArgumentException
- if the named measure is not supportedprotected double measureKernelEvaluations()
protected double measureCacheHits()