public class NominalGenerator extends RandomizableGenerator implements NominalAttributeGenerator
-S <seed> Sets the seed of the random number generator of the generator (default: 1)
Constructor and Description |
---|
NominalGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
buildGenerator(weka.core.Instances someinstances,
weka.core.Attribute att)
Sets up the generator with the counts required for generation.
|
double |
generate()
Generates an index of a nominal attribute as artificial data.
|
double |
getLogProbabilityOf(double valuex)
Gets the (natural) log of the probability of a given value.
|
double |
getProbabilityOf(double valuex)
Gets the probability of a given attribute value (provided as an index).
|
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 void buildGenerator(weka.core.Instances someinstances, weka.core.Attribute att)
buildGenerator
in interface NominalAttributeGenerator
someinstances
- The instances to count up.att
- The attribute to count up with.public double generate()
public double getProbabilityOf(double valuex)
getProbabilityOf
in class Generator
valuex
- The index to the attribute value.public double getLogProbabilityOf(double valuex)
getLogProbabilityOf
in class Generator
valuex
- The index of the nominal value.