Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.classifiers.meta.generators
Class DiscreteUniformGenerator

    java.lang.Object
      weka.classifiers.meta.generators.Generator
          weka.classifiers.meta.generators.RandomizableGenerator
              weka.classifiers.meta.generators.DiscreteUniformGenerator

All Implemented Interfaces:
  java.io.Serializable, InstanceHandler, NumericAttributeGenerator, CapabilitiesHandler, OptionHandler

    public class DiscreteUniformGenerator

extends RandomizableGenerator
implements InstanceHandler, NumericAttributeGenerator

An artificial data generator that uses discrete buckets for values.
In this discrete uniform generator, all buckets are given the same probability, regardless of how many values fall into each bucket. This is not to be confused with the discrete generator which gives every bucket a probability based on how full the bucket is.

Valid options are:

     -D
      If set, generator is run in debug mode and
      may output additional info to the console

     -S <seed>
      Sets the seed of the random number generator of the generator (default: 1)

Version:
  $Revision: 5793 $
Author:
  Kathryn Hempstalk (kah18 at cs.waikato.ac.nz)
See Also:
  `DiscreteGenerator`, Serialized Form

Constructor Summary
`DiscreteUniformGenerator()`

Method Summary
`void` | `buildGenerator(Instances someinstances)` Builds the generator with a given set of instances.
`double` | `generate()` Generates a value that falls under this distribution.
`Capabilities` | `getCapabilities()` Returns the Capabilities of this object
`double` | `getLogProbabilityOf(double valuex)` Gets the (natural) log of the probability of a given value.
`double` | `getProbabilityOf(double valuex)` Gets the probability that a value falls under this distribution.
`java.lang.String` | `globalInfo()` Returns a string describing this class' ability.

Methods inherited from class weka.classifiers.meta.generators.RandomizableGenerator
`getOptions, getSeed, listOptions, seedTipText, setOptions, setSeed`

Methods inherited from class weka.classifiers.meta.generators.Generator
`copy, debugTipText, forName, getDebug, setDebug`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DiscreteUniformGenerator

    public DiscreteUniformGenerator()

Method Detail

### globalInfo

    public java.lang.String globalInfo()

  Returns a string describing this class' ability.

  Specified by:
    `globalInfo` in class `Generator`
  Returns:
    A description of the class.

### getCapabilities

    public Capabilities getCapabilities()

  Returns the Capabilities of this object

  Specified by:
    `getCapabilities` in interface `CapabilitiesHandler`
  Returns:
    the capabilities of this object
  See Also:
    `Capabilities`

### buildGenerator

    public void buildGenerator(Instances someinstances)
                        throws java.lang.Exception

  Builds the generator with a given set of instances.

  Specified by:
    `buildGenerator` in interface `InstanceHandler`
  Parameters:
    `someinstances` - The instances that will be used to build up the probabilities for this generator.
  Throws:
    `java.lang.Exception` - if data cannot be processed

### generate

    public double generate()

  Generates a value that falls under this distribution.

  Specified by:
    `generate` in class `Generator`
  Returns:
    A generated value.

### getProbabilityOf

    public double getProbabilityOf(double valuex)

  Gets the probability that a value falls under this distribution.

  Specified by:
    `getProbabilityOf` in class `Generator`
  Parameters:
    `valuex` - The value to get the probability of.
  Returns:
    The probability of the given value.

### getLogProbabilityOf

    public double getLogProbabilityOf(double valuex)

  Gets the (natural) log of the probability of a given value.

  Specified by:
    `getLogProbabilityOf` in class `Generator`
  Parameters:
    `valuex` - The value to get the log probability of.
  Returns:
    The (natural) log of the probability.

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD