public class SimpleMI extends SingleClassifierEnhancer implements OptionHandler, 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 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(Instances train)
Builds the classifier
|
double[] |
distributionForInstance(Instance newBag)
Computes the distribution for a given exemplar
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
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.
|
SelectedTag |
getTransformMethod()
Get the method used in transformation.
|
java.lang.String |
globalInfo()
Returns a string describing this filter
|
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(java.lang.String[] argv)
Main method for testing this class.
|
static double[] |
minimax(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(SelectedTag newMethod)
Set the method used in transformation.
|
java.lang.String |
toString()
Gets a string describing the classifier.
|
Instances |
transform(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, setClassifierclassifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebugpublic static final int TRANSFORMMETHOD_ARITHMETIC
public static final int TRANSFORMMETHOD_GEOMETRIC
public static final int TRANSFORMMETHOD_MINIMAX
public static final Tag[] TAGS_TRANSFORMMETHOD
public java.lang.String globalInfo()
public java.util.Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class SingleClassifierEnhancerpublic 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)
-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
setOptions in interface OptionHandlersetOptions in class SingleClassifierEnhanceroptions - 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 SingleClassifierEnhancerpublic java.lang.String transformMethodTipText()
public void setTransformMethod(SelectedTag newMethod)
newMethod - the index of method to use.public SelectedTag getTransformMethod()
public Instances transform(Instances train) throws java.lang.Exception
train - the multi-instance dataset (with relational attribute)java.lang.Exception - if the transformation failspublic static double[] minimax(Instances data, int attIndex)
data - the dataattIndex - the index of the attributepublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class SingleClassifierEnhancerCapabilitiespublic Capabilities getMultiInstanceCapabilities()
getMultiInstanceCapabilities in interface MultiInstanceCapabilitiesHandlerCapabilitiespublic void buildClassifier(Instances train) throws java.lang.Exception
buildClassifier in class Classifiertrain - the training data to be used for generating the
boosted classifier.java.lang.Exception - if the classifier could not be built successfullypublic double[] distributionForInstance(Instance newBag) throws java.lang.Exception
distributionForInstance in class ClassifiernewBag - 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.Objectpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class Classifierpublic static void main(java.lang.String[] argv)
argv - should contain the command line arguments to the
scheme (see Evaluation)