public class MultiInstanceToPropositional extends Filter implements OptionHandler, UnsupervisedFilter, MultiInstanceCapabilitiesHandler
-A <num> The type of weight setting for each prop. instance: 0.weight = original single bag weight /Total number of prop. instance in the corresponding bag; 1.weight = 1.0; 2.weight = 1.0/Total number of prop. instance in the corresponding bag; 3. weight = Total number of prop. instance / (Total number of bags * Total number of prop. instance in the corresponding bag). (default:0)
PropositionalToMultiInstance
,
Serialized FormModifier and Type | Field and Description |
---|---|
static Tag[] |
TAGS_WEIGHTMETHOD
weight methods
|
static int |
WEIGHTMETHOD_1
weight method: 1.0
|
static int |
WEIGHTMETHOD_INVERSE1
weight method: 1.0 / Total # of prop.
|
static int |
WEIGHTMETHOD_INVERSE2
weight method: Total # of prop.
|
static int |
WEIGHTMETHOD_ORIGINAL
weight method: keep the weight to be the same as the original value
|
Constructor and Description |
---|
MultiInstanceToPropositional() |
Modifier and Type | Method and Description |
---|---|
boolean |
batchFinished()
Signify that this batch of input to the filter is finished.
|
Capabilities |
getCapabilities()
Returns the Capabilities of this filter.
|
Capabilities |
getMultiInstanceCapabilities()
Returns the capabilities of this multi-instance filter for the
relational data (i.e., the bags).
|
java.lang.String[] |
getOptions()
Gets the current settings of the classifier.
|
java.lang.String |
getRevision()
Returns the revision string.
|
SelectedTag |
getWeightMethod()
Returns the current weighting method for instances.
|
java.lang.String |
globalInfo()
Returns a string describing this filter
|
boolean |
input(Instance instance)
Input an instance for filtering.
|
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options
|
static void |
main(java.lang.String[] args)
Main method for running this filter.
|
boolean |
setInputFormat(Instances instanceInfo)
Sets the format of the input instances.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setWeightMethod(SelectedTag method)
The new method for weighting the instances.
|
java.lang.String |
weightMethodTipText()
Returns the tip text for this property
|
batchFilterFile, filterFile, getCapabilities, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, numPendingOutput, output, outputPeek, toString, useFilter, wekaStaticWrapper
public static final int WEIGHTMETHOD_ORIGINAL
public static final int WEIGHTMETHOD_1
public static final int WEIGHTMETHOD_INVERSE1
public static final int WEIGHTMETHOD_INVERSE2
public static final Tag[] TAGS_WEIGHTMETHOD
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-A <num> The type of weight setting for each prop. instance: 0.weight = original single bag weight /Total number of prop. instance in the corresponding bag; 1.weight = 1.0; 2.weight = 1.0/Total number of prop. instance in the corresponding bag; 3. weight = Total number of prop. instance / (Total number of bags * Total number of prop. instance in the corresponding bag). (default:0)
setOptions
in interface OptionHandler
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 OptionHandler
public java.lang.String weightMethodTipText()
public void setWeightMethod(SelectedTag method)
method
- the new methodpublic SelectedTag getWeightMethod()
public java.lang.String globalInfo()
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Filter
Capabilities
public Capabilities getMultiInstanceCapabilities()
getMultiInstanceCapabilities
in interface MultiInstanceCapabilitiesHandler
Capabilities
public boolean setInputFormat(Instances instanceInfo) throws java.lang.Exception
setInputFormat
in class Filter
instanceInfo
- an Instances object containing the input
instance structure (any instances contained in the object are
ignored - only the structure is required).java.lang.Exception
- if the input format can't be set
successfullypublic boolean input(Instance instance)
public boolean batchFinished()
batchFinished
in class Filter
java.lang.IllegalStateException
- if no input structure has been definedpublic java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Filter
public static void main(java.lang.String[] args)
args
- should contain arguments to the filter:
use -h for help