public class MultiClassClassifierUpdateable extends MultiClassClassifier implements OptionHandler, UpdateableClassifier
-M <num> Sets the method to use. Valid values are 0 (1-against-all), 1 (random codes), 2 (exhaustive code), and 3 (1-against-1). (default 0)
-R <num> Sets the multiplier when using random codes. (default 2.0)
-P Use pairwise coupling (only has an effect for 1-against1)
-S <num> Random number seed. (default 1)
-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of base classifier. (default: weka.classifiers.functions.SGD)
METHOD_1_AGAINST_1, METHOD_1_AGAINST_ALL, METHOD_ERROR_EXHAUSTIVE, METHOD_ERROR_RANDOM, TAGS_METHOD
BATCH_SIZE_DEFAULT, NUM_DECIMAL_PLACES_DEFAULT
Constructor and Description |
---|
MultiClassClassifierUpdateable()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances insts)
Builds the classifiers.
|
double[] |
distributionForInstance(Instance inst)
Returns the distribution for an instance.
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.lang.String |
globalInfo() |
static void |
main(java.lang.String[] argv)
Main method for testing this class.
|
void |
updateClassifier(Instance instance)
Updates the classifier with the given instance.
|
getCapabilities, getLogLossDecoding, getMethod, getOptions, getRandomWidthFactor, getUsePairwiseCoupling, individualPredictions, listOptions, logLossDecodingTipText, methodTipText, pairwiseCoupling, randomWidthFactorTipText, setLogLossDecoding, setMethod, setOptions, setRandomWidthFactor, setUsePairwiseCoupling, toString, usePairwiseCouplingTipText
getSeed, seedTipText, setSeed
classifierTipText, getClassifier, postExecution, preExecution, setClassifier
batchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getOptions, listOptions, makeCopy, setOptions
public MultiClassClassifierUpdateable()
public java.lang.String globalInfo()
globalInfo
in class MultiClassClassifier
public void buildClassifier(Instances insts) throws java.lang.Exception
MultiClassClassifier
buildClassifier
in interface Classifier
buildClassifier
in class MultiClassClassifier
insts
- the training data.java.lang.Exception
- if a classifier can't be builtpublic void updateClassifier(Instance instance) throws java.lang.Exception
updateClassifier
in interface UpdateableClassifier
instance
- the new training instance to include in the modeljava.lang.Exception
- if the instance could not be incorporated in the
model.public double[] distributionForInstance(Instance inst) throws java.lang.Exception
distributionForInstance
in interface Classifier
distributionForInstance
in class MultiClassClassifier
inst
- the instance to get the distribution forjava.lang.Exception
- if the distribution can't be computed successfullypublic java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class MultiClassClassifier
public static void main(java.lang.String[] argv)
argv
- the options