All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.gui.boundaryvisualizer.KDDataGenerator

java.lang.Object
    |
    +----weka.gui.boundaryvisualizer.KDDataGenerator

public class KDDataGenerator
extends java.lang.Object
implements DataGenerator, java.io.Serializable
KDDataGenerator. Class that uses kernels to generate new random instances based on a supplied set of instances.

Since:
1.0
Version:
$Revision: 1.4 $
Author:
Mark Hall
See Also:
DataGenerator, java.io.Serializable

Constructor Index

 o KDDataGenerator()
 

Method Index

 o buildGenerator(Instances)
Initialize the generator using the supplied instances
 o generateInstances(int[])
Generates a new instance using one kernel estimator.
 o getKernelBandwidth()
Get the kernel bandwidth
 o getNumGeneratingModels()
Return the number of kernels (there is one per training instance)
 o getWeights()
 
 o setKernelBandwidth(int)
Set the kernel bandwidth (number of nearest neighbours to cover)
 o setSeed(int)
Initializes a new random number generator using the supplied seed.
 o setWeightingDimensions(boolean[])
Set which dimensions to use when computing a weight for the next instance to generate
 o setWeightingValues(double[])
Set the values for the weighting dimensions to be used when computing the weight for the next instance to be generated

Constructor Detail

 o KDDataGenerator
public KDDataGenerator()

Method Detail

 o buildGenerator
public void buildGenerator(Instances inputInstances) throws java.lang.Exception
          Initialize the generator using the supplied instances
Parameters:
inputInstances - the instances to use as the basis of the kernels
Throws:
java.lang.Exception - if an error occurs
 o getWeights
public double[] getWeights()
 o generateInstances
public double[][] generateInstances(int indices[]) throws java.lang.Exception
          Generates a new instance using one kernel estimator. Each successive call to this method incremets the index of the kernel to use.
Parameters:
fast - generate the instance quickly
Returns:
the new random instance
Throws:
java.lang.Exception - if an error occurs
 o setWeightingDimensions
public void setWeightingDimensions(boolean dims[])
          Set which dimensions to use when computing a weight for the next instance to generate
Parameters:
dims - an array of booleans indicating which dimensions to use
 o setWeightingValues
public 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
Parameters:
vals - an array of doubles containing the values of the weighting dimensions (corresponding to the entries that are set to true throw setWeightingDimensions)
 o getNumGeneratingModels
public int getNumGeneratingModels()
          Return the number of kernels (there is one per training instance)
Returns:
the number of kernels
 o setKernelBandwidth
public void setKernelBandwidth(int kb)
          Set the kernel bandwidth (number of nearest neighbours to cover)
Parameters:
kb - an int value
 o getKernelBandwidth
public int getKernelBandwidth()
          Get the kernel bandwidth
Returns:
an int value
 o setSeed
public void setSeed(int seed)
          Initializes a new random number generator using the supplied seed.
Parameters:
seed - an int value

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home