public class SimpleMI
extends weka.classifiers.SingleClassifierEnhancer
implements weka.core.OptionHandler, weka.core.MultiInstanceCapabilitiesHandler
-M [1|2|3] The method used in transformation: 1.arithmatic average; 2.geometric centor; 3.using minimax combined features of a bag (default: 1) Method 3: Define s to be the vector of the coordinate-wise maxima and minima of X, ie., s(X)=(minx1, ..., minxm, maxx1, ...,maxxm), transform the exemplars into mono-instance which contains attributes s(X)
-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.rules.ZeroR)
Options specific to classifier weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the console
Modifier and Type | Field and Description |
---|---|
static weka.core.Tag[] |
TAGS_TRANSFORMMETHOD
the transformation methods
|
static int |
TRANSFORMMETHOD_ARITHMETIC
arithmetic average
|
static int |
TRANSFORMMETHOD_GEOMETRIC
geometric average
|
static int |
TRANSFORMMETHOD_MINIMAX
using minimax combined features of a bag
|
Constructor and Description |
---|
SimpleMI() |
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(weka.core.Instances train)
Builds the classifier
|
double[] |
distributionForInstance(weka.core.Instance newBag)
Computes the distribution for a given exemplar
|
weka.core.Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
weka.core.Capabilities |
getMultiInstanceCapabilities()
Returns the capabilities of this multi-instance classifier for the
relational data.
|
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
java.lang.String |
getRevision()
Returns the revision string.
|
weka.core.SelectedTag |
getTransformMethod()
Get the method used in transformation.
|
java.lang.String |
globalInfo()
Returns a string describing this filter
|
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.
|
static double[] |
minimax(weka.core.Instances data,
int attIndex)
Get the minimal and maximal value of a certain attribute in a certain data
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setTransformMethod(weka.core.SelectedTag newMethod)
Set the method used in transformation.
|
java.lang.String |
toString()
Gets a string describing the classifier.
|
weka.core.Instances |
transform(weka.core.Instances train)
Implements MITransform (3 type of transformation) 1.arithmatic average;
2.geometric centor; 3.merge minima and maxima attribute value together
|
java.lang.String |
transformMethodTipText()
Returns the tip text for this property
|
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
public static final int TRANSFORMMETHOD_ARITHMETIC
public static final int TRANSFORMMETHOD_GEOMETRIC
public static final int TRANSFORMMETHOD_MINIMAX
public static final weka.core.Tag[] TAGS_TRANSFORMMETHOD
public java.lang.String globalInfo()
public java.util.Enumeration<weka.core.Option> listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class weka.classifiers.SingleClassifierEnhancer
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-M [1|2|3] The method used in transformation: 1.arithmatic average; 2.geometric centor; 3.using minimax combined features of a bag (default: 1) Method 3: Define s to be the vector of the coordinate-wise maxima and minima of X, ie., s(X)=(minx1, ..., minxm, maxx1, ...,maxxm), transform the exemplars into mono-instance which contains attributes s(X)
-W Full name of base classifier. (default: weka.classifiers.rules.ZeroR)
Options specific to classifier weka.classifiers.rules.ZeroR:
setOptions
in interface weka.core.OptionHandler
setOptions
in class weka.classifiers.SingleClassifierEnhancer
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 weka.core.OptionHandler
getOptions
in class weka.classifiers.SingleClassifierEnhancer
public java.lang.String transformMethodTipText()
public void setTransformMethod(weka.core.SelectedTag newMethod)
newMethod
- the index of method to use.public weka.core.SelectedTag getTransformMethod()
public weka.core.Instances transform(weka.core.Instances train) throws java.lang.Exception
train
- the multi-instance dataset (with relational attribute)java.lang.Exception
- if the transformation failspublic static double[] minimax(weka.core.Instances data, int attIndex)
data
- the dataattIndex
- the index of the attributepublic weka.core.Capabilities getCapabilities()
getCapabilities
in interface weka.classifiers.Classifier
getCapabilities
in interface weka.core.CapabilitiesHandler
getCapabilities
in class weka.classifiers.SingleClassifierEnhancer
public weka.core.Capabilities getMultiInstanceCapabilities()
getMultiInstanceCapabilities
in interface weka.core.MultiInstanceCapabilitiesHandler
Capabilities
public void buildClassifier(weka.core.Instances train) throws java.lang.Exception
buildClassifier
in interface weka.classifiers.Classifier
train
- the training data to be used for generating the boosted
classifier.java.lang.Exception
- if the classifier could not be built successfullypublic double[] distributionForInstance(weka.core.Instance newBag) throws java.lang.Exception
distributionForInstance
in interface weka.classifiers.Classifier
distributionForInstance
in class weka.classifiers.AbstractClassifier
newBag
- the exemplar for which distribution is computedjava.lang.Exception
- if the distribution can't be computed successfullypublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface weka.core.RevisionHandler
getRevision
in class weka.classifiers.AbstractClassifier
public static void main(java.lang.String[] argv)
argv
- should contain the command line arguments to the scheme (see
Evaluation)