public class SMOreg extends Classifier 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), 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)
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
|
static Tag[] |
TAGS_FILTER
The filter to apply to the training data
|
Constructor and Description |
---|
SMOreg() |
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.
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
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
|
java.lang.String[] |
getOptions()
Gets the current settings of the classifier.
|
RegOptimizer |
getRegOptimizer()
returns the learning algorithm
|
java.lang.String |
getRevision()
Returns the revision string.
|
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.
|
static void |
main(java.lang.String[] args)
Main method for running this classifier.
|
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.
|
debugTipText, distributionForInstance, forName, getDebug, makeCopies, makeCopy, setDebug
public static final int FILTER_NORMALIZE
public static final int FILTER_STANDARDIZE
public static final int FILTER_NONE
public static final Tag[] TAGS_FILTER
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class Classifier
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), 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 Classifier
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 Classifier
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Classifier
Capabilities
public void buildClassifier(Instances instances) throws java.lang.Exception
buildClassifier
in class Classifier
instances
- the set of training instancesjava.lang.Exception
- if the classifier can't be built successfullypublic double classifyInstance(Instance instance) throws java.lang.Exception
classifyInstance
in class Classifier
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 supportedpublic java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Classifier
public static void main(java.lang.String[] args)
args
- the commandline options