public class KDDataGenerator extends java.lang.Object implements DataGenerator, java.io.Serializable
DataGenerator
,
Serializable
,
Serialized FormConstructor and Description |
---|
KDDataGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
buildGenerator(Instances inputInstances)
Initialize the generator using the supplied instances
|
double[][] |
generateInstances(int[] indices)
Generates a new instance using one kernel estimator.
|
int |
getKernelBandwidth()
Get the kernel bandwidth
|
int |
getNumGeneratingModels()
Return the number of kernels (there is one per training instance)
|
double[] |
getWeights()
Get weights
|
void |
setKernelBandwidth(int kb)
Set the kernel bandwidth (number of nearest neighbours to cover)
|
void |
setSeed(int seed)
Initializes a new random number generator using the
supplied seed.
|
void |
setWeightingDimensions(boolean[] dims)
Set which dimensions to use when computing a weight for the next
instance to generate
|
void |
setWeightingValues(double[] vals)
Set the values for the weighting dimensions to be used when computing
the weight for the next instance to be generated
|
public void buildGenerator(Instances inputInstances) throws java.lang.Exception
buildGenerator
in interface DataGenerator
inputInstances
- the instances to use as the basis of the kernelsjava.lang.Exception
- if an error occurspublic double[] getWeights()
DataGenerator
getWeights
in interface DataGenerator
public double[][] generateInstances(int[] indices) throws java.lang.Exception
generateInstances
in interface DataGenerator
java.lang.Exception
- if an error occurspublic void setWeightingDimensions(boolean[] dims)
setWeightingDimensions
in interface DataGenerator
dims
- an array of booleans indicating which dimensions to usepublic void setWeightingValues(double[] vals)
setWeightingValues
in interface DataGenerator
vals
- an array of doubles containing the values of the
weighting dimensions (corresponding to the entries that are set to
true throw setWeightingDimensions)public int getNumGeneratingModels()
getNumGeneratingModels
in interface DataGenerator
public void setKernelBandwidth(int kb)
kb
- an int
valuepublic int getKernelBandwidth()
int
valuepublic void setSeed(int seed)
setSeed
in interface DataGenerator
seed
- an int
value