weka.classifiers.meta.generators
Class GaussianGenerator

java.lang.Object
  extended by weka.classifiers.meta.generators.Generator
      extended by weka.classifiers.meta.generators.RandomizableGenerator
          extended by weka.classifiers.meta.generators.RandomizableDistributionGenerator
              extended by weka.classifiers.meta.generators.GaussianGenerator
All Implemented Interfaces:
java.io.Serializable, Mean, NumericAttributeGenerator, OptionHandler

public class GaussianGenerator
extends RandomizableDistributionGenerator
implements NumericAttributeGenerator

An artificial data generator that uses a single Gaussian distribution.

If a mixture of Gaussians is required, use the EM Generator.

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)
 -M <num>
  Sets the mean of the generator
  (default: 0)
 -SD <num>
  Sets the standard deviation of the generator
  (default: 1)

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

Constructor Summary
GaussianGenerator()
           
 
Method Summary
 double generate()
          Generates a value that falls under this distribution.
 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.RandomizableDistributionGenerator
getMean, getOptions, getStandardDeviation, listOptions, meanTipText, setMean, setOptions, setStandardDeviation, standardDeviationTipText
 
Methods inherited from class weka.classifiers.meta.generators.RandomizableGenerator
getSeed, seedTipText, 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

GaussianGenerator

public GaussianGenerator()
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.

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.