|
||||||||||
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.RandomizableDistributionGenerator
weka.classifiers.meta.generators.MixedGaussianGenerator
public class MixedGaussianGenerator
A mixed Gaussian artificial data generator.
This generator only has two Gaussians, each sitting 3 standard deviations (by default) away from the mean of the main distribution. Each model has half of the probability. The idea is that the two sub-models form a boundary either side of the main distribution.
-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)
-di <distance> Sets the difference between the mean and what will be used on the lower and higher distributions for the generator. (default: 3)
-da If set, the generator will use the absolute value of the difference. If not set, it will multiply the difference by the standard deviation.
Constructor Summary | |
---|---|
MixedGaussianGenerator()
|
Method Summary | |
---|---|
java.lang.String |
distanceAbsoluteTipText()
Returns the tip text for this property. |
java.lang.String |
distanceTipText()
Returns the tip text for this property. |
double |
generate()
Generates a value that falls under this distribution. |
double |
getDistance()
Gets the difference between the main distribution and each of the models. |
boolean |
getDistanceAbsolute()
Gets whether the difference will be an absolute value, or something that is used as a multiplier to the standard deviation. |
double |
getLogProbabilityOf(double valuex)
Gets the (natural) log of the probability of a given value. |
java.lang.String[] |
getOptions()
Gets the current settings of the generator. |
double |
getProbability(double valuex,
double mean,
double stddev)
Gets the probability that a value falls under a given Gaussian distribution. |
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. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
void |
setDistance(double diff)
Sets the difference between the main distribution and the models. |
void |
setDistanceAbsolute(boolean newdiff)
Sets the difference to be absolute (or not). |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
Methods inherited from class weka.classifiers.meta.generators.RandomizableDistributionGenerator |
---|
getMean, getStandardDeviation, meanTipText, setMean, 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 |
---|
public MixedGaussianGenerator()
Method Detail |
---|
public java.lang.String globalInfo()
globalInfo
in class Generator
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class RandomizableDistributionGenerator
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-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)
-di <distance> Sets the difference between the mean and what will be used on the lower and higher distributions for the generator. (default: 3)
-da If set, the generator will use the absolute value of the difference. If not set, it will multiply the difference by the standard deviation.
setOptions
in interface OptionHandler
setOptions
in class RandomizableDistributionGenerator
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class RandomizableDistributionGenerator
public double getDistance()
public void setDistance(double diff)
diff
- The new difference.public java.lang.String distanceTipText()
public boolean getDistanceAbsolute()
public void setDistanceAbsolute(boolean newdiff)
newdiff
- Whether the difference should be absolute or
a standard deviation modifier.public java.lang.String distanceAbsoluteTipText()
public double generate()
generate
in class Generator
public double getProbabilityOf(double valuex)
getProbabilityOf
in class Generator
valuex
- The value to get the probability of.
public double getProbability(double valuex, double mean, double stddev)
valuex
- The value to get the probability of.mean
- The mean of the Gaussian distribution.stddev
- The standard deviation of the Gaussian distribution.
public double getLogProbabilityOf(double valuex)
getLogProbabilityOf
in class Generator
valuex
- The value to get the log probability of.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |