Package weka.gui.boundaryvisualizer
Interface DataGenerator
- All Known Implementing Classes:
KDDataGenerator
public interface DataGenerator
Interface to something that can generate new instances based on
a set of input instances
- Since:
- 1.0
- Version:
- $Revision: 8034 $
- Author:
- Mark Hall
-
Method Summary
Modifier and TypeMethodDescriptionvoid
buildGenerator
(Instances inputInstances) Build the data generatordouble[][]
generateInstances
(int[] indices) Generate an instance.int
Returns the number of generating models used by this DataGeneratordouble[]
Get weightsvoid
setSeed
(int seed) Set a seed for random number generation (if needed).void
setWeightingDimensions
(boolean[] dimensions) Set the dimensions to be used in computing a weight for each instance generatedvoid
setWeightingValues
(double[] vals) Set the values of the dimensions (chosen via setWeightingDimensions) to be used when computing instance weights
-
Method Details
-
buildGenerator
Build the data generator- Parameters:
inputInstances
- Instances to build the generator from- Throws:
Exception
- if an error occurs
-
generateInstances
Generate an instance. Should return a new Instance object- Returns:
- an
Instance
value - Throws:
Exception
- if an error occurs
-
getWeights
Get weights- Throws:
Exception
-
setWeightingDimensions
void setWeightingDimensions(boolean[] dimensions) Set the dimensions to be used in computing a weight for each instance generated- Parameters:
dimensions
- an array of booleans specifying the dimensions to be used when computing instance weights
-
setWeightingValues
void setWeightingValues(double[] vals) Set the values of the dimensions (chosen via setWeightingDimensions) to be used when computing instance weights- Parameters:
vals
- adouble[]
value
-
getNumGeneratingModels
int getNumGeneratingModels()Returns the number of generating models used by this DataGenerator- Returns:
- an
int
value
-
setSeed
void setSeed(int seed) Set a seed for random number generation (if needed).- Parameters:
seed
- anint
value
-