public class MixedGaussianGenerator extends RandomizableDistributionGenerator implements NumericAttributeGenerator
-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 and Description |
---|
MixedGaussianGenerator() |
Modifier and Type | Method and Description |
---|---|
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<weka.core.Option> |
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.
|
getMean, getStandardDeviation, meanTipText, setMean, setStandardDeviation, standardDeviationTipText
getSeed, seedTipText, setSeed
copy, debugTipText, forName, getDebug, setDebug
public java.lang.String globalInfo()
globalInfo
in class Generator
public java.util.Enumeration<weka.core.Option> listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class RandomizableDistributionGenerator
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-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 weka.core.OptionHandler
setOptions
in class RandomizableDistributionGenerator
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface weka.core.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()
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.