public class RegSMOImproved extends RegSMO implements 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{Shevade1999,
address = {Control Division, Dept. of Mechanical Engineering},
author = {S.K. Shevade and S.S. Keerthi and C. Bhattacharyya and K.R.K. Murthy},
institution = {National University of Singapore},
number = {CD-99-16},
title = {Improvements to the SMO Algorithm for SVM Regression},
year = {1999},
PS = {http://guppy.mpe.nus.edu.sg/\~mpessk/svm/smoreg_mod.ps.gz}
}
Valid options are:
-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)
| Modifier and Type | Field and Description |
|---|---|
static int |
I0 |
static int |
I0a |
static int |
I0b |
static int |
I1 |
static int |
I2 |
static int |
I3 |
protected double |
m_bLow
b.up and b.low boundaries used to determine stopping criterion
|
protected double |
m_bUp
b.up and b.low boundaries used to determine stopping criterion
|
protected SMOset |
m_I0
The different sets used by the algorithm.
|
protected int |
m_iLow
index of the instance that gave us b.up and b.low
|
protected int[] |
m_iSet
Index set {i: 0 < m_alpha[i] < C || 0 < m_alphaStar[i] < C}}
|
protected int |
m_iUp
index of the instance that gave us b.up and b.low
|
m_alpha1, m_alpha1Star, m_alpha2, m_alpha2Star, m_Del, m_epsm_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 |
|---|
RegSMOImproved() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildClassifier(Instances instances)
learn SVM parameters from data using Keerthi's SMO algorithm.
|
protected int |
examineExample(int i2)
parameters correspond to pseudocode from paper.
|
java.lang.String[] |
getOptions()
Gets the current settings of the object.
|
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.
|
double |
getTolerance()
returns the current tolerance
|
java.lang.String |
globalInfo()
Returns a string describing the object
|
protected void |
init(Instances data)
initialize various variables before starting the actual optimizer
|
boolean |
isUseVariant1()
Whether variant 1 is used
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options
|
protected void |
optimize1()
use variant 1 of Shevade's et al.s paper
|
protected void |
optimize2()
use variant 2 of Shevade's et al.s paper
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setTolerance(double d)
sets the tolerance
|
void |
setUseVariant1(boolean b)
Sets whether to use variant 1
|
protected int |
takeStep(int i1,
int i2,
double alpha2,
double alpha2Star,
double phi2)
takeStep method from Shevade et al.s paper. parameters correspond to
pseudocode from paper.
|
java.lang.String |
toleranceTipText()
Returns the tip text for this property
|
protected void |
updateBoundaries(int i2,
double F2)
updates boundaries bLow and bHi and corresponding indexes
|
protected void |
updateIndexSetFor(int i,
double C)
updates the index sets I0a, IOb, I1, I2 and I3 for vector i
|
java.lang.String |
useVariant1TipText()
Returns the tip text for this property
|
protected void |
wrapUp()
wrap up various variables to save memeory and do some housekeeping after
optimization has finished.
|
epsilonTipText, findOptimalPointOnLine, getEpsilon, optimize, secondChoiceHeuristic, setEpsilonepsilonParameterTipText, getCacheHits, getEpsilonParameter, getKernelEvaluations, getScore, getSeed, modelBuilt, seedTipText, setEpsilonParameter, setSeed, setSMOReg, SVMOutput, SVMOutput, toStringpublic static final int I0
public static final int I0a
public static final int I0b
public static final int I1
public static final int I2
public static final int I3
protected SMOset m_I0
protected int[] m_iSet
protected double m_bUp
protected double m_bLow
protected int m_iUp
protected int m_iLow
public java.lang.String globalInfo()
globalInfo in class RegSMOpublic TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlergetTechnicalInformation in class RegSMOpublic java.util.Enumeration<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class RegSMOpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
-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)
setOptions in interface OptionHandlersetOptions in class RegSMOoptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class RegSMOpublic java.lang.String toleranceTipText()
public double getTolerance()
public void setTolerance(double d)
d - the new tolerancepublic java.lang.String useVariant1TipText()
public boolean isUseVariant1()
public void setUseVariant1(boolean b)
b - if true then variant 1 is usedprotected int takeStep(int i1,
int i2,
double alpha2,
double alpha2Star,
double phi2)
throws java.lang.Exception
protected void updateIndexSetFor(int i,
double C)
throws java.lang.Exception
i - index of vectorC - capacity for vector ijava.lang.Exceptionprotected void updateBoundaries(int i2,
double F2)
i2 - index of vectorF2 - error of vector i2protected int examineExample(int i2)
throws java.lang.Exception
examineExample in class RegSMOi2 - index of candidatejava.lang.Exceptionprotected void init(Instances data) throws java.lang.Exception
protected void optimize1()
throws java.lang.Exception
java.lang.Exception - if something goes wrongprotected void optimize2()
throws java.lang.Exception
java.lang.Exception - if something goes wrongprotected void wrapUp()
throws java.lang.Exception
public void buildClassifier(Instances instances) throws java.lang.Exception
buildClassifier in class RegSMOinstances - the data to work withjava.lang.Exception - if something goes wrongpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class RegSMO