|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.meta.generators.Generator
weka.classifiers.meta.generators.RandomizableGenerator
weka.classifiers.meta.generators.NominalGenerator
public class NominalGenerator
A generator for nominal attributes.
Generates artificial data for nominal attributes. Each attribute value is considered to be possible, i.e. the probability of any value is always non-zero.
-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)
Constructor Summary | |
---|---|
NominalGenerator()
|
Method Summary | |
---|---|
void |
buildGenerator(Instances someinstances,
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. |
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 |
---|
public NominalGenerator()
Method Detail |
---|
public java.lang.String globalInfo()
globalInfo
in class Generator
public void buildGenerator(Instances someinstances, Attribute att)
buildGenerator
in interface NominalAttributeGenerator
someinstances
- The instances to count up.att
- The attribute to count up with.public double generate()
generate
in class Generator
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |