public class RegSMO extends RegOptimizer implements TechnicalInformationHandler
@misc{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:
-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)
Modifier and Type | Field and Description |
---|---|
protected double |
m_alpha1
alpha value for first candidate
|
protected double |
m_alpha1Star
alpha* value for first candidate
|
protected double |
m_alpha2
alpha value for second candidate
|
protected double |
m_alpha2Star
alpha* value for second candidate
|
protected static double |
m_Del
Precision constant for updating sets
|
protected double |
m_eps
tolerance parameter, smaller changes on alpha in inner loop will be ignored
|
m_alpha, m_alphaStar, m_b, m_bModelBuilt, m_C, m_classIndex, m_data, m_epsilon, m_kernel, m_nCacheHits, m_nEvals, m_nInstances, m_nSeed, m_random, m_sparseIndices, m_sparseWeights, m_supportVectors, m_SVM, m_target, m_weights
Constructor and Description |
---|
RegSMO()
default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances instances)
learn SVM parameters from data using Smola's SMO algorithm.
|
java.lang.String |
epsilonTipText()
Returns the tip text for this property
|
protected int |
examineExample(int i2)
examineExample method from pseudocode.
|
protected boolean |
findOptimalPointOnLine(int i1,
double alpha1,
double alpha1Star,
double C1,
int i2,
double alpha2,
double alpha2Star,
double C2,
double gamma,
double eta,
double deltaPhi)
Finds optimal point on line constrained by first (i1) and second (i2)
candidate.
|
double |
getEpsilon()
Get the value of epsilon.
|
java.lang.String[] |
getOptions()
Gets the current settings of the classifier.
|
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
|
protected void |
init(Instances data)
initialize various variables before starting the actual optimizer
|
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options
|
void |
optimize()
finds alpha and alpha* parameters that optimize the SVM target function
|
protected int |
secondChoiceHeuristic(int i2)
applies heuristic for finding candidate that is expected to lead to
good gain when applying takeStep together with second candidate.
|
void |
setEpsilon(double v)
Set the value of epsilon.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
protected int |
takeStep(int i1,
int i2,
double alpha2,
double alpha2Star,
double phi2)
takeStep method from pseudocode.
|
protected void |
wrapUp()
wrap up various variables to save memeory and do some housekeeping after optimization
has finished.
|
epsilonParameterTipText, getCacheHits, getEpsilonParameter, getKernelEvaluations, getScore, getSeed, modelBuilt, seedTipText, setEpsilonParameter, setSeed, setSVMReg, SVMOutput, SVMOutput
protected double m_eps
protected static final double m_Del
protected double m_alpha1
protected double m_alpha1Star
protected double m_alpha2
protected double m_alpha2Star
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class RegOptimizer
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-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)
setOptions
in interface OptionHandler
setOptions
in class RegOptimizer
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 RegOptimizer
public java.lang.String epsilonTipText()
public double getEpsilon()
public void setEpsilon(double v)
v
- Value to assign to epsilon.protected void init(Instances data) throws java.lang.Exception
init
in class RegOptimizer
data
- data set used for learningjava.lang.Exception
- if something goes wrongprotected void wrapUp() throws java.lang.Exception
wrapUp
in class RegOptimizer
java.lang.Exception
- if something goes wrongprotected boolean findOptimalPointOnLine(int i1, double alpha1, double alpha1Star, double C1, int i2, double alpha2, double alpha2Star, double C2, double gamma, double eta, double deltaPhi)
i1
- alpha1
- alpha1Star
- C1
- i2
- alpha2
- alpha2Star
- C2
- gamma
- eta
- deltaPhi
- protected int takeStep(int i1, int i2, double alpha2, double alpha2Star, double phi2) throws java.lang.Exception
i1
- i2
- alpha2
- alpha2Star
- phi2
- java.lang.Exception
protected int examineExample(int i2) throws java.lang.Exception
i2
- java.lang.Exception
protected int secondChoiceHeuristic(int i2)
i2
- index of second candidatepublic void optimize() throws java.lang.Exception
java.lang.Exception
public void buildClassifier(Instances instances) throws java.lang.Exception
buildClassifier
in class RegOptimizer
instances
- the data to learn fromjava.lang.Exception
- if something goes wrong