public class UnivariateMixtureEstimator extends java.lang.Object implements UnivariateDensityEstimator, UnivariateIntervalEstimator, UnivariateQuantileEstimator, OptionHandler, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
class |
UnivariateMixtureEstimator.MM
Fast univariate mixture model implementation.
|
Constructor and Description |
---|
UnivariateMixtureEstimator() |
Modifier and Type | Method and Description |
---|---|
void |
addValue(double value,
double weight)
Adds a value to the density estimator.
|
UnivariateMixtureEstimator.MM |
buildModel(int K,
double[] values,
double[] weights)
Build mixture model.
|
int |
getMaxNumComponents()
Returns the number of components to use.
|
int |
getNumBootstrapRuns()
Returns the number of Bootstrap runs.
|
int |
getNumComponents()
Returns the number of components to use.
|
java.lang.String[] |
getOptions()
Returns the current set of options.
|
java.lang.String |
getRevision()
Returns the revision string.
|
int |
getSeed()
Gets the seed for the random number generations
|
boolean |
getUseNormalizedEntropy() |
java.lang.String |
globalInfo()
Returns a string describing the estimator.
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration that lists the command-line options that are available
|
double |
logDensity(double value)
Returns the natural logarithm of the density estimate at the given
point.
|
static void |
main(java.lang.String[] args)
Main method, used for testing this class.
|
java.lang.String |
maxNumComponentsToolTipText()
The tool tip for this property.
|
java.lang.String |
numBootstrapRunsToolTipText()
The tool tip for this property.
|
java.lang.String |
numComponentsToolTipText()
The tool tip for this property.
|
double[][] |
predictIntervals(double conf)
Returns the interval for the given confidence value.
|
double |
predictQuantile(double percentage)
Returns the quantile for the given percentage.
|
double[][] |
resampleWithWeights(java.util.Random random,
boolean[] sampled)
Creates a new dataset of the same size using random sampling with
replacement according to the given weight vector.
|
java.lang.String |
seedTipText()
Returns the tip text for this property
|
void |
setMaxNumComponents(int maxNumComponents)
Sets the number of components to use.
|
void |
setNumBootstrapRuns(int numBootstrapRuns)
Sets the number of Bootstrap runs.
|
void |
setNumComponents(int numComponents)
Sets the number of components to use.
|
void |
setOptions(java.lang.String[] options)
Sets options based on the given array of strings.
|
void |
setSeed(int seed)
Set the seed for random number generation.
|
void |
setUseNormalizedEntropy(boolean useNormalizedEntropy) |
java.lang.String |
toString()
Returns textual description of this estimator.
|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
makeCopy
public java.lang.String globalInfo()
public boolean getUseNormalizedEntropy()
public void setUseNormalizedEntropy(boolean useNormalizedEntropy)
useNormalizedEntropy
- whether to use normalized entropypublic java.lang.String numBootstrapRunsToolTipText()
public int getNumBootstrapRuns()
public void setNumBootstrapRuns(int numBootstrapRuns)
mnumBootstrapRuns
- the number of Bootstrap runspublic java.lang.String numComponentsToolTipText()
public int getNumComponents()
public void setNumComponents(int numComponents)
m_NumComponents
- the m_NumComponents to setpublic java.lang.String seedTipText()
public void setSeed(int seed)
seed
- the seedpublic int getSeed()
public java.lang.String maxNumComponentsToolTipText()
public int getMaxNumComponents()
public void setMaxNumComponents(int maxNumComponents)
maxNumComponents
- the maximum number of components to evaluatepublic void addValue(double value, double weight)
addValue
in interface UnivariateDensityEstimator
addValue
in interface UnivariateIntervalEstimator
addValue
in interface UnivariateQuantileEstimator
value
- the value to addweight
- the weight of the valuepublic UnivariateMixtureEstimator.MM buildModel(int K, double[] values, double[] weights)
public double[][] resampleWithWeights(java.util.Random random, boolean[] sampled)
public double[][] predictIntervals(double conf)
predictIntervals
in interface UnivariateIntervalEstimator
conf
- the confidence value in the interval [0, 1]public double predictQuantile(double percentage)
predictQuantile
in interface UnivariateQuantileEstimator
percentage
- the percentagepublic double logDensity(double value)
logDensity
in interface UnivariateDensityEstimator
value
- the value at which to evaluatepublic java.lang.String toString()
toString
in class java.lang.Object
public java.util.Enumeration<Option> listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface OptionHandler
options
- the list of options to parsejava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception