public class MISMO
extends weka.classifiers.AbstractClassifier
implements weka.core.WeightedInstancesHandler, weka.core.MultiInstanceCapabilitiesHandler, weka.core.TechnicalInformationHandler
@incollection{Platt1998,
author = {J. Platt},
booktitle = {Advances in Kernel Methods - Support Vector Learning},
editor = {B. Schoelkopf and C. Burges and A. Smola},
publisher = {MIT Press},
title = {Machines using Sequential Minimal Optimization},
year = {1998}
}
@article{Keerthi2001,
author = {S.S. Keerthi and S.K. Shevade and C. Bhattacharyya and K.R.K. Murthy},
journal = {Neural Computation},
number = {3},
pages = {637-649},
title = {Improvements to Platt's SMO Algorithm for SVM Classifier Design},
volume = {13},
year = {2001}
}
Valid options are:
-no-checks Turns off all checks - use with caution! Turning them off assumes that data is purely numeric, doesn't contain any missing values, and has a nominal class. Turning them off also means that no header information will be stored if the machine is linear. Finally, it also assumes that no instance has a weight equal to 0. (default: checks on)
-C <double> The complexity constant C. (default 1)
-N Whether to 0=normalize/1=standardize/2=neither. (default 0=normalize)
-I Use MIminimax feature space.
-L <double> The tolerance parameter. (default 1.0e-3)
-P <double> The epsilon for round-off error. (default 1.0e-12)
-M Fit logistic models to SVM outputs.
-V <double> The number of folds for the internal cross-validation. (default -1, use training data)
-W <double> The random number seed. (default 1)
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
Options specific to kernel weka.classifiers.mi.supportVector.MIPolyKernel:
-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
No normalization/standardization
|
static int |
FILTER_NORMALIZE
Normalize training data
|
static int |
FILTER_STANDARDIZE
Standardize training data
|
static weka.core.Tag[] |
TAGS_FILTER
The filter to apply to the training data
|
| Constructor and Description |
|---|
MISMO() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[][][] |
attributeNames()
Returns the attribute names.
|
double[][] |
bias()
Returns the bias of each binary SMO.
|
void |
buildClassifier(weka.core.Instances insts)
Method for building the classifier.
|
java.lang.String |
buildLogisticModelsTipText()
Returns the tip text for this property
|
java.lang.String |
checksTurnedOffTipText()
Returns the tip text for this property
|
java.lang.String[] |
classAttributeNames()
Returns the names of the class attributes.
|
java.lang.String |
cTipText()
Returns the tip text for this property
|
double[] |
distributionForInstance(weka.core.Instance inst)
Estimates class probabilities for given instance.
|
java.lang.String |
epsilonTipText()
Returns the tip text for this property
|
java.lang.String |
filterTypeTipText()
Returns the tip text for this property
|
boolean |
getBuildLogisticModels()
Get the value of buildLogisticModels.
|
double |
getC()
Get the value of C.
|
weka.core.Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
boolean |
getChecksTurnedOff()
Returns whether the checks are turned off or not.
|
double |
getEpsilon()
Get the value of epsilon.
|
weka.core.SelectedTag |
getFilterType()
Gets how the training data will be transformed.
|
weka.classifiers.functions.supportVector.Kernel |
getKernel()
Gets the kernel to use.
|
boolean |
getMinimax()
Check if the MIMinimax feature space is to be used.
|
weka.core.Capabilities |
getMultiInstanceCapabilities()
Returns the capabilities of this multi-instance classifier for the
relational data.
|
int |
getNumFolds()
Get the value of numFolds.
|
java.lang.String[] |
getOptions()
Gets the current settings of the classifier.
|
int |
getRandomSeed()
Get the value of randomSeed.
|
java.lang.String |
getRevision()
Returns the revision string.
|
weka.core.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 |
getToleranceParameter()
Get the value of tolerance parameter.
|
java.lang.String |
globalInfo()
Returns a string describing classifier
|
java.lang.String |
kernelTipText()
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[] argv)
Main method for testing this class.
|
java.lang.String |
minimaxTipText()
Returns the tip text for this property
|
int |
numClassAttributeValues()
Returns the number of values of the class attribute.
|
java.lang.String |
numFoldsTipText()
Returns the tip text for this property
|
double[] |
pairwiseCoupling(double[][] n,
double[][] r)
Implements pairwise coupling.
|
java.lang.String |
randomSeedTipText()
Returns the tip text for this property
|
void |
setBuildLogisticModels(boolean newbuildLogisticModels)
Set the value of buildLogisticModels.
|
void |
setC(double v)
Set the value of C.
|
void |
setChecksTurnedOff(boolean value)
Disables or enables the checks (which could be time-consuming).
|
void |
setEpsilon(double v)
Set the value of epsilon.
|
void |
setFilterType(weka.core.SelectedTag newType)
Sets how the training data will be transformed.
|
void |
setKernel(weka.classifiers.functions.supportVector.Kernel value)
Sets the kernel to use.
|
void |
setMinimax(boolean v)
Set if the MIMinimax feature space is to be used.
|
void |
setNumFolds(int newnumFolds)
Set the value of numFolds.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setRandomSeed(int newrandomSeed)
Set the value of randomSeed.
|
void |
setToleranceParameter(double v)
Set the value of tolerance parameter.
|
int[][][] |
sparseIndices()
Returns the indices in sparse format.
|
double[][][] |
sparseWeights()
Returns the weights in sparse format.
|
java.lang.String |
toleranceParameterTipText()
Returns the tip text for this property
|
java.lang.String |
toString()
Prints out the classifier.
|
void |
turnChecksOff()
Turns off checks for missing values, etc.
|
void |
turnChecksOn()
Turns on checks for missing values, etc.
|
batchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlacespublic static final int FILTER_NORMALIZE
public static final int FILTER_STANDARDIZE
public static final int FILTER_NONE
public static final weka.core.Tag[] TAGS_FILTER
public java.lang.String globalInfo()
public weka.core.TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface weka.core.TechnicalInformationHandlerpublic void turnChecksOff()
public void turnChecksOn()
public weka.core.Capabilities getCapabilities()
getCapabilities in interface weka.classifiers.ClassifiergetCapabilities in interface weka.core.CapabilitiesHandlergetCapabilities in class weka.classifiers.AbstractClassifierpublic weka.core.Capabilities getMultiInstanceCapabilities()
getMultiInstanceCapabilities in interface weka.core.MultiInstanceCapabilitiesHandlerCapabilitiespublic void buildClassifier(weka.core.Instances insts)
throws java.lang.Exception
buildClassifier in interface weka.classifiers.Classifierinsts - the set of training instancesjava.lang.Exception - if the classifier can't be built successfullypublic double[] distributionForInstance(weka.core.Instance inst)
throws java.lang.Exception
distributionForInstance in interface weka.classifiers.ClassifierdistributionForInstance in class weka.classifiers.AbstractClassifierinst - the instance to compute the distribution forjava.lang.Exception - if computation failspublic double[] pairwiseCoupling(double[][] n,
double[][] r)
n - the sum of weights used to train each modelr - the probability estimate from each modelpublic double[][][] sparseWeights()
public int[][][] sparseIndices()
public double[][] bias()
public int numClassAttributeValues()
public java.lang.String[] classAttributeNames()
public java.lang.String[][][] attributeNames()
public java.util.Enumeration<weka.core.Option> listOptions()
listOptions in interface weka.core.OptionHandlerlistOptions in class weka.classifiers.AbstractClassifierpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
-no-checks Turns off all checks - use with caution! Turning them off assumes that data is purely numeric, doesn't contain any missing values, and has a nominal class. Turning them off also means that no header information will be stored if the machine is linear. Finally, it also assumes that no instance has a weight equal to 0. (default: checks on)
-C <double> The complexity constant C. (default 1)
-N Whether to 0=normalize/1=standardize/2=neither. (default 0=normalize)
-I Use MIminimax feature space.
-L <double> The tolerance parameter. (default 1.0e-3)
-P <double> The epsilon for round-off error. (default 1.0e-12)
-M Fit logistic models to SVM outputs.
-V <double> The number of folds for the internal cross-validation. (default -1, use training data)
-W <double> The random number seed. (default 1)
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
Options specific to kernel weka.classifiers.mi.supportVector.MIPolyKernel:
-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.OptionHandlersetOptions in class weka.classifiers.AbstractClassifieroptions - 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.OptionHandlergetOptions in class weka.classifiers.AbstractClassifierpublic void setChecksTurnedOff(boolean value)
value - if true turns off all checkspublic boolean getChecksTurnedOff()
public java.lang.String checksTurnedOffTipText()
public java.lang.String kernelTipText()
public weka.classifiers.functions.supportVector.Kernel getKernel()
public void setKernel(weka.classifiers.functions.supportVector.Kernel value)
value - the kernelpublic java.lang.String cTipText()
public double getC()
public void setC(double v)
v - Value to assign to C.public java.lang.String toleranceParameterTipText()
public double getToleranceParameter()
public void setToleranceParameter(double v)
v - Value to assign to tolerance parameter.public java.lang.String epsilonTipText()
public double getEpsilon()
public void setEpsilon(double v)
v - Value to assign to epsilon.public java.lang.String filterTypeTipText()
public weka.core.SelectedTag getFilterType()
public void setFilterType(weka.core.SelectedTag newType)
newType - the new filtering modepublic java.lang.String minimaxTipText()
public boolean getMinimax()
public void setMinimax(boolean v)
v - true if RBFpublic java.lang.String buildLogisticModelsTipText()
public boolean getBuildLogisticModels()
public void setBuildLogisticModels(boolean newbuildLogisticModels)
newbuildLogisticModels - Value to assign to buildLogisticModels.public java.lang.String numFoldsTipText()
public int getNumFolds()
public void setNumFolds(int newnumFolds)
newnumFolds - Value to assign to numFolds.public java.lang.String randomSeedTipText()
public int getRandomSeed()
public void setRandomSeed(int newrandomSeed)
newrandomSeed - Value to assign to randomSeed.public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getRevision()
getRevision in interface weka.core.RevisionHandlergetRevision in class weka.classifiers.AbstractClassifierpublic static void main(java.lang.String[] argv)
argv - the commandline parameters