public abstract class AbstractInstanceIterator
extends java.lang.Object
implements weka.core.OptionHandler, java.io.Serializable
Instances
.Constructor and Description |
---|
AbstractInstanceIterator() |
Modifier and Type | Method and Description |
---|---|
org.nd4j.linalg.dataset.api.iterator.DataSetIterator |
getDataSetIterator(weka.core.Instances data,
int seed)
Returns the actual iterator.
|
abstract org.nd4j.linalg.dataset.api.iterator.DataSetIterator |
getDataSetIterator(weka.core.Instances data,
int seed,
int batchSize)
Returns the actual iterator.
|
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
int |
getTrainBatchSize()
Getting the training batch size
|
void |
initialize()
Initialize the iterator
|
java.util.Enumeration<weka.core.Option> |
listOptions()
Returns an enumeration describing the available options.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setTrainBatchSize(int trainBatchSize)
Setting the training batch size
|
abstract void |
validate(weka.core.Instances data)
Validates the input dataset
|
public org.nd4j.linalg.dataset.api.iterator.DataSetIterator getDataSetIterator(weka.core.Instances data, int seed) throws java.lang.Exception
data
- the dataset to useseed
- the seed for the random number generatorjava.lang.Exception
- if the constructor cannot be constructed successfullypublic abstract org.nd4j.linalg.dataset.api.iterator.DataSetIterator getDataSetIterator(weka.core.Instances data, int seed, int batchSize) throws java.lang.Exception
data
- the dataset to useseed
- the seed for the random number generatorbatchSize
- the batch size to usejava.lang.Exception
- if the constructor cannot be constructed successfully@OptionMetadata(displayName="size of mini batch", description="The mini batch size to use in the iterator (default = 1).", commandLineParamName="bs", commandLineParamSynopsis="-bs <int>", displayOrder=1) public int getTrainBatchSize()
public void setTrainBatchSize(int trainBatchSize)
trainBatchSize
- the batch sizepublic void initialize()
public abstract void validate(weka.core.Instances data) throws InvalidInputDataException
data
- the input datasetInvalidInputDataException
- if validation is unsuccessfulpublic java.util.Enumeration<weka.core.Option> listOptions()
listOptions
in interface weka.core.OptionHandler
public java.lang.String[] getOptions()
getOptions
in interface weka.core.OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface weka.core.OptionHandler
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supported