|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.filters.Filter
weka.filters.unsupervised.attribute.MultiInstanceToPropositional
public class MultiInstanceToPropositional
Converts the multi-instance dataset into single instance dataset so that the Nominalize, Standardize and other type of filters or transformation can be applied to these data for the further preprocessing.
Note: the first attribute of the converted dataset is a nominal attribute and refers to the bagId.
-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 FormField Summary | |
---|---|
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 Summary | |
---|---|
MultiInstanceToPropositional()
|
Method Summary | |
---|---|
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 |
Methods inherited from class weka.filters.Filter |
---|
batchFilterFile, filterFile, getCapabilities, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, numPendingOutput, output, outputPeek, toString, useFilter, wekaStaticWrapper |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public MultiInstanceToPropositional()
Method Detail |
---|
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 strings
java.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)
input
in class Filter
instance
- the input instance
java.lang.IllegalStateException
- if no input format has been set.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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |