|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.filters.Filter | +--weka.filters.unsupervised.instance.RemoveFolds
This filter takes a dataset and outputs a specified fold for cross validation. If you want the folds to be stratified use the supervised version. Valid options are:
-V
Specifies if inverse of selection is to be output.
-N number of folds
Specifies number of folds dataset is split into (default 10).
-F fold
Specifies which fold is selected. (default 1)
-S seed
Specifies a random number seed for shuffling the dataset.
(default 0, don't randomize)
Constructor Summary | |
RemoveFolds()
|
Method Summary | |
boolean |
batchFinished()
Signify that this batch of input to the filter is finished. |
java.lang.String |
foldTipText()
Returns the tip text for this property |
int |
getFold()
Gets the fold which is selected. |
boolean |
getInvertSelection()
Gets if selection is to be inverted. |
int |
getNumFolds()
Gets the number of folds in which dataset is to be split into. |
java.lang.String[] |
getOptions()
Gets the current settings of the filter. |
long |
getSeed()
Gets the random number seed used for shuffling the dataset. |
java.lang.String |
globalInfo()
Returns a string describing this filter |
java.lang.String |
invertSelectionTipText()
Returns the tip text for this property |
java.util.Enumeration |
listOptions()
Gets an enumeration describing the available options.. |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
java.lang.String |
numFoldsTipText()
Returns the tip text for this property |
java.lang.String |
seedTipText()
Returns the tip text for this property |
void |
setFold(int fold)
Selects a fold. |
boolean |
setInputFormat(Instances instanceInfo)
Sets the format of the input instances. |
void |
setInvertSelection(boolean inverse)
Sets if selection is to be inverted. |
void |
setNumFolds(int numFolds)
Sets the number of folds the dataset is split into. |
void |
setOptions(java.lang.String[] options)
Parses the options for this object. |
void |
setSeed(long seed)
Sets the random number seed for shuffling the dataset. |
Methods inherited from class weka.filters.Filter |
batchFilterFile, filterFile, getOutputFormat, input, inputFormat, isOutputFormatDefined, numPendingOutput, output, outputFormat, outputPeek, useFilter |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RemoveFolds()
Method Detail |
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-V
Specifies if inverse of selection is to be output.
-N number of folds
Specifies number of folds dataset is split into (default 10).
-F fold
Specifies which fold is selected. (default 1)
-S seed
Specifies a random number seed for shuffling the dataset.
(default 0, no randomizing)
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 globalInfo()
public java.lang.String invertSelectionTipText()
public boolean getInvertSelection()
public void setInvertSelection(boolean inverse)
inverse
- true if inversion is to be performedpublic java.lang.String numFoldsTipText()
public int getNumFolds()
public void setNumFolds(int numFolds)
numFolds
- number of folds dataset is to be split into
java.lang.IllegalArgumentException
- if number of folds is negativepublic java.lang.String foldTipText()
public int getFold()
public void setFold(int fold)
fold
- the fold to be selected.
java.lang.IllegalArgumentException
- if fold's index is smaller than 1public java.lang.String seedTipText()
public long getSeed()
public void setSeed(long seed)
seed
- the random number seedpublic 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 batchFinished()
batchFinished
in class Filter
java.lang.IllegalStateException
- if no input structure has been definedpublic static void main(java.lang.String[] argv)
argv
- 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 |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London