|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.filters.Filter
weka.filters.SimpleFilter
weka.filters.SimpleStreamFilter
weka.filters.unsupervised.attribute.RandomSubset
public class RandomSubset
Chooses a random subset of attributes, either an absolute number or a percentage. The class is always included in the output (as the last attribute).
Valid options are:-D Turns on output of debugging information.
-N <double> The number of attributes to randomly select. If < 1 then percentage, >= 1 absolute number. (default: 0.5)
-S <int> The seed value. (default: 1)
Constructor Summary | |
---|---|
RandomSubset()
|
Method Summary | |
---|---|
Capabilities |
getCapabilities()
Returns the Capabilities of this filter. |
double |
getNumAttributes()
Get the number of attributes (< 1 percentage, >= 1 absolute number). |
java.lang.String[] |
getOptions()
Gets the current settings of the filter. |
java.lang.String |
getRevision()
Returns the revision string. |
int |
getSeed()
Get the seed value for the random number generator. |
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[] args)
Runs the filter with the given parameters. |
java.lang.String |
numAttributesTipText()
Returns the tip text for this property. |
java.lang.String |
seedTipText()
Returns the tip text for this property. |
void |
setNumAttributes(double value)
Set the number of attributes. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setSeed(int value)
Set the seed value for the random number generator. |
Methods inherited from class weka.filters.SimpleStreamFilter |
---|
batchFinished, input |
Methods inherited from class weka.filters.SimpleFilter |
---|
debugTipText, getDebug, setDebug, setInputFormat |
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 |
Constructor Detail |
---|
public RandomSubset()
Method Detail |
---|
public java.lang.String globalInfo()
globalInfo
in class SimpleFilter
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class SimpleFilter
public java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class SimpleFilter
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-D Turns on output of debugging information.
-N <double> The number of attributes to randomly select. If < 1 then percentage, >= 1 absolute number. (default: 0.5)
-S <int> The seed value. (default: 1)
setOptions
in interface OptionHandler
setOptions
in class SimpleFilter
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedSimpleFilter.reset()
public java.lang.String numAttributesTipText()
public double getNumAttributes()
public void setNumAttributes(double value)
value
- the number of attributes to use.public java.lang.String seedTipText()
public int getSeed()
public void setSeed(int value)
value
- the seed value.public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Filter
Capabilities
public java.lang.String getRevision()
public static void main(java.lang.String[] args)
args
- the commandline options
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |