weka.gui.boundaryvisualizer
Interface DataGenerator

All Known Implementing Classes:
EMDataGenerator, KDDataGenerator

public interface DataGenerator

Interface to something that can generate new instances based on a set of input instances

Since:
1.0

Method Summary
 void buildGenerator(Instances inputInstances)
          Build the data generator
 Instance generateInstance()
          Generate an instance.
 Instance generateInstanceFast()
          Generate an instance.
 int getNumGeneratingModels()
          Returns the number of generating models used by this DataGenerator
 void setWeightingDimensions(boolean[] dimensions)
          Set the dimensions to be used in computing a weight for each instance generated
 void setWeightingValues(double[] vals)
          Set the values of the dimensions (chosen via setWeightingDimensions) to be used when computing instance weights
 

Method Detail

buildGenerator

public void buildGenerator(Instances inputInstances)
                    throws java.lang.Exception
Build the data generator

Parameters:
inputInstances - Instances to build the generator from
Throws:
java.lang.Exception - if an error occurs

generateInstance

public Instance generateInstance()
                          throws java.lang.Exception
Generate an instance. Should return a new Instance object

Returns:
an Instance value
Throws:
java.lang.Exception - if an error occurs

generateInstanceFast

public Instance generateInstanceFast()
                              throws java.lang.Exception
Generate an instance. Can reuse an existing instance object for speed.

Returns:
an Instance value
Throws:
java.lang.Exception - if an error occurs

setWeightingDimensions

public 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

public void setWeightingValues(double[] vals)
Set the values of the dimensions (chosen via setWeightingDimensions) to be used when computing instance weights

Parameters:
vals - a double[] value

getNumGeneratingModels

public int getNumGeneratingModels()
Returns the number of generating models used by this DataGenerator

Returns:
an int value