public class MIWrapper
extends weka.classifiers.SingleClassifierEnhancer
implements weka.core.MultiInstanceCapabilitiesHandler, weka.core.OptionHandler, weka.core.TechnicalInformationHandler
@techreport{Frank2003,
address = {Department of Computer Science, University of Waikato, Hamilton, NZ},
author = {E. T. Frank and X. Xu},
institution = {University of Waikato},
month = {06},
title = {Applying propositional learning algorithms to multi-instance data},
year = {2003}
}
Valid options are:
-P [1|2|3] The method used in testing: 1.arithmetic average 2.geometric average 3.max probability of positive bag. (default: 1)
-A [0|1|2|3] The type of weight setting for each single-instance: 0.keep the weight to be the same as the original value; 1.weight = 1.0 2.weight = 1.0/Total number of single-instance in the corresponding bag 3. weight = Total number of single-instance / (Total number of bags * Total number of single-instance in the corresponding bag). (default: 3)
-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_TESTMETHOD
the test methods
|
static int |
TESTMETHOD_ARITHMETIC
arithmetic average
|
static int |
TESTMETHOD_GEOMETRIC
geometric average
|
static int |
TESTMETHOD_MAXPROB
max probability of positive bag
|
| Constructor and Description |
|---|
MIWrapper() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildClassifier(weka.core.Instances data)
Builds the classifier
|
double[] |
distributionForInstance(weka.core.Instance exmp)
Computes the distribution for a given exemplar
|
weka.core.Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
weka.core.SelectedTag |
getMethod()
Get the method used in testing.
|
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.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.
|
weka.core.SelectedTag |
getWeightMethod()
Returns the current weighting method for instances.
|
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.
|
java.lang.String |
methodTipText()
Returns the tip text for this property
|
void |
setMethod(weka.core.SelectedTag method)
Set the method used in testing.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setWeightMethod(weka.core.SelectedTag method)
The new method for weighting the instances.
|
java.lang.String |
toString()
Gets a string describing the classifier.
|
java.lang.String |
weightMethodTipText()
Returns the tip text for this property
|
classifierTipText, getClassifier, postExecution, preExecution, setClassifierbatchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlacespublic static final int TESTMETHOD_ARITHMETIC
public static final int TESTMETHOD_GEOMETRIC
public static final int TESTMETHOD_MAXPROB
public static final weka.core.Tag[] TAGS_TESTMETHOD
public java.lang.String globalInfo()
public weka.core.TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface weka.core.TechnicalInformationHandlerpublic java.util.Enumeration<weka.core.Option> listOptions()
listOptions in interface weka.core.OptionHandlerlistOptions in class weka.classifiers.SingleClassifierEnhancerpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
-P [1|2|3] The method used in testing: 1.arithmetic average 2.geometric average 3.max probability of positive bag. (default: 1)
-A [0|1|2|3] The type of weight setting for each single-instance: 0.keep the weight to be the same as the original value; 1.weight = 1.0 2.weight = 1.0/Total number of single-instance in the corresponding bag 3. weight = Total number of single-instance / (Total number of bags * Total number of single-instance in the corresponding bag). (default: 3)
-W Full name of base classifier. (default: weka.classifiers.rules.ZeroR)
Options specific to classifier weka.classifiers.rules.ZeroR:
setOptions in interface weka.core.OptionHandlersetOptions in class weka.classifiers.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 weka.core.OptionHandlergetOptions in class weka.classifiers.SingleClassifierEnhancerpublic java.lang.String weightMethodTipText()
public void setWeightMethod(weka.core.SelectedTag method)
method - the new methodpublic weka.core.SelectedTag getWeightMethod()
public java.lang.String methodTipText()
public void setMethod(weka.core.SelectedTag method)
method - the index of method to use.public weka.core.SelectedTag getMethod()
public weka.core.Capabilities getCapabilities()
getCapabilities in interface weka.classifiers.ClassifiergetCapabilities in interface weka.core.CapabilitiesHandlergetCapabilities in class weka.classifiers.SingleClassifierEnhancerpublic weka.core.Capabilities getMultiInstanceCapabilities()
getMultiInstanceCapabilities in interface weka.core.MultiInstanceCapabilitiesHandlerCapabilitiespublic void buildClassifier(weka.core.Instances data)
throws java.lang.Exception
buildClassifier in interface weka.classifiers.Classifierdata - 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 exmp)
throws java.lang.Exception
distributionForInstance in interface weka.classifiers.ClassifierdistributionForInstance in class weka.classifiers.AbstractClassifierexmp - 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 weka.core.RevisionHandlergetRevision in class weka.classifiers.AbstractClassifierpublic static void main(java.lang.String[] argv)
argv - should contain the command line arguments to the scheme (see
Evaluation)