public abstract class InstanceGenerator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
InstanceGenerator.NestedArgs
Struct for dealing with nested args on InstanceGenerators that are chained together.
|
Constructor and Description |
---|
InstanceGenerator(InstanceGenerator generator)
Clones an InstanceGenerator from another
|
InstanceGenerator(weka.core.Instances training,
weka.core.Instances testing)
Build an instance generator from the given training and testing data
|
InstanceGenerator(java.lang.String datasetString)
Builds an InstanceGenerator from a datasetFileName, ie a zip file containing exactly two files, 'train.arff' and 'test.arff'
|
Modifier and Type | Method and Description |
---|---|
abstract weka.core.Instances |
_getTestingFromParams(java.lang.String params) |
abstract weka.core.Instances |
_getTrainingFromParams(java.lang.String params) |
static InstanceGenerator |
create(java.lang.String className,
weka.core.Instances training,
weka.core.Instances testing)
Creates an instance of an InstanceGenerator given a class name, training data and the testing data
|
static InstanceGenerator |
create(java.lang.String className,
java.lang.String datasetFileName)
Creates an instance of an InstanceGenerator given a class name and the datasetFileName
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
getAllInstanceFeatures(java.lang.String params)
Some SMBO methods can leverage extra features about an Instance, this method should return a map of feature/value pairs for all instances
|
abstract java.util.List<java.lang.String> |
getAllInstanceStrings(java.lang.String params)
Gets a list of all the 'params' Strings that can be used with this InstanceGenerator.
|
weka.core.Instances |
getTesting()
Gets a copy of the testing data
|
weka.core.Instances |
getTestingFromParams(java.lang.String params)
Given a parameter string (generally in the form of a property string), get the testing data; if params is 'default', then this method returns the raw testing data
|
weka.core.Instances |
getTraining()
Gets a copy of the training data
|
weka.core.Instances |
getTrainingFromParams(java.lang.String params)
Given a parameter string (generally in the form of a property string), get the training data; if params is 'default', then this method returns the raw training data
|
public InstanceGenerator(InstanceGenerator generator)
generator
- The instance generator.public InstanceGenerator(weka.core.Instances training, weka.core.Instances testing)
training
- The training instances.testing
- The testing instances.public InstanceGenerator(java.lang.String datasetString)
datasetString
- The string the describing the dataset.public final weka.core.Instances getTrainingFromParams(java.lang.String params)
params
- The parameter string.public final weka.core.Instances getTestingFromParams(java.lang.String params)
params
- The parameter string.public abstract weka.core.Instances _getTrainingFromParams(java.lang.String params)
public abstract weka.core.Instances _getTestingFromParams(java.lang.String params)
public weka.core.Instances getTraining()
public weka.core.Instances getTesting()
public abstract java.util.List<java.lang.String> getAllInstanceStrings(java.lang.String params)
params
- The parameters.public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getAllInstanceFeatures(java.lang.String params)
params
- The parameters.public static InstanceGenerator create(java.lang.String className, java.lang.String datasetFileName)
className
- The name of the class.datasetFileName
- The name of the dataset file.public static InstanceGenerator create(java.lang.String className, weka.core.Instances training, weka.core.Instances testing)
className
- The name of the class.training
- The training instances.testing
- The testing instances.