autoweka.instancegenerators
Class RandomSubSampling
java.lang.Object
autoweka.InstanceGenerator
autoweka.instancegenerators.RandomSubSampling
- Direct Known Subclasses:
- MultiLevel, TerminationHoldout
public class RandomSubSampling
- extends InstanceGenerator
Experimental InstanceGenerator that splits the data up into random folds, with a fixed percentage used for training
instanceGeneratorArguments: A property string with the following
startingseed - the initial seed of the splits
numsamples - the number of folds to gererate
percent - the percentage of data to use in the training set
bias - the bias towards a uniform partition
instance string format:
seed - the seed used to split up data
percent - the percentage of data to use in the training set
bias - the bias towards a uniform partition
Method Summary |
Instances |
_getTestingFromParams(java.lang.String params)
Subclass implementation for getting the testing data given the param string |
Instances |
_getTrainingFromParams(java.lang.String params)
Subclass implementation for getting the training data given the param string |
java.util.List<java.lang.String> |
getAllInstanceStrings(java.lang.String paramStr)
Gets a list of all the 'params' Strings that can be used with this InstanceGenerator. |
protected Instances |
getInstances(Instances data,
Resample filter)
|
protected Resample |
newFilter()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomSubSampling
public RandomSubSampling(InstanceGenerator generator)
RandomSubSampling
public RandomSubSampling(Instances training,
Instances testing)
RandomSubSampling
public RandomSubSampling(java.lang.String instanceFileName)
_getTrainingFromParams
public Instances _getTrainingFromParams(java.lang.String params)
- Description copied from class:
InstanceGenerator
- Subclass implementation for getting the training data given the param string
- Specified by:
_getTrainingFromParams
in class InstanceGenerator
_getTestingFromParams
public Instances _getTestingFromParams(java.lang.String params)
- Description copied from class:
InstanceGenerator
- Subclass implementation for getting the testing data given the param string
- Specified by:
_getTestingFromParams
in class InstanceGenerator
newFilter
protected final Resample newFilter()
getInstances
protected Instances getInstances(Instances data,
Resample filter)
getAllInstanceStrings
public java.util.List<java.lang.String> getAllInstanceStrings(java.lang.String paramStr)
- Description copied from class:
InstanceGenerator
- Gets a list of all the 'params' Strings that can be used with this InstanceGenerator.
For example, the for 10-fold Cross Validation this method would return 10 Strings defining each fold
- Specified by:
getAllInstanceStrings
in class InstanceGenerator