|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.gui.boundaryvisualizer.KDDataGenerator
public class KDDataGenerator
KDDataGenerator. Class that uses kernels to generate new random instances based on a supplied set of instances.
DataGenerator
,
Serializable
,
Serialized FormConstructor Summary | |
---|---|
KDDataGenerator()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KDDataGenerator()
Method Detail |
---|
public void buildGenerator(Instances inputInstances) throws java.lang.Exception
buildGenerator
in interface DataGenerator
inputInstances
- the instances to use as the basis of the kernels
java.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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |