public class DiscreteGenerator extends RandomizableGenerator implements InstanceHandler, NumericAttributeGenerator
-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)
DiscreteUniformGenerator
,
Serialized FormConstructor and Description |
---|
DiscreteGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
buildGenerator(weka.core.Instances someinstances)
Builds the generator with a given set of instances.
|
double |
generate()
Generates a value that falls under this distribution.
|
weka.core.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.
|
getOptions, getSeed, listOptions, seedTipText, setOptions, setSeed
copy, debugTipText, forName, getDebug, setDebug
public java.lang.String globalInfo()
globalInfo
in class Generator
public weka.core.Capabilities getCapabilities()
getCapabilities
in interface weka.core.CapabilitiesHandler
Capabilities
public void buildGenerator(weka.core.Instances someinstances) throws java.lang.Exception
buildGenerator
in interface InstanceHandler
someinstances
- The instances that will be used to
build up the probabilities for this generator.java.lang.Exception
- if data cannot be handledpublic double generate()
public double getProbabilityOf(double valuex)
getProbabilityOf
in class Generator
valuex
- The value to get the probability of.public double getLogProbabilityOf(double valuex)
getLogProbabilityOf
in class Generator
valuex
- The value to get the log probability of.