public class UnivariateMixtureEstimator extends Object implements UnivariateDensityEstimator, UnivariateIntervalEstimator, UnivariateQuantileEstimator, OptionHandler, 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.
|
String[] |
getOptions()
Returns the current set of options.
|
String |
getRevision()
Returns the revision string.
|
int |
getSeed()
Gets the seed for the random number generations
|
boolean |
getUseNormalizedEntropy() |
String |
globalInfo()
Returns a string describing the estimator.
|
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(String[] args)
Main method, used for testing this class.
|
String |
maxNumComponentsToolTipText()
The tool tip for this property.
|
String |
numBootstrapRunsToolTipText()
The tool tip for this property.
|
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(Random random,
boolean[] sampled)
Creates a new dataset of the same size using random sampling with
replacement according to the given weight vector.
|
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(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) |
String |
toString()
Returns textual description of this estimator.
|
public String globalInfo()
public boolean getUseNormalizedEntropy()
public void setUseNormalizedEntropy(boolean useNormalizedEntropy)
useNormalizedEntropy
- whether to use normalized entropypublic String numBootstrapRunsToolTipText()
public int getNumBootstrapRuns()
public void setNumBootstrapRuns(int numBootstrapRuns)
mnumBootstrapRuns
- the number of Bootstrap runspublic String numComponentsToolTipText()
public int getNumComponents()
public void setNumComponents(int numComponents)
m_NumComponents
- the m_NumComponents to setpublic String seedTipText()
public void setSeed(int seed)
seed
- the seedpublic int getSeed()
public 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(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 String toString()
public Enumeration<Option> listOptions()
listOptions
in interface OptionHandler
public void setOptions(String[] options) throws Exception
setOptions
in interface OptionHandler
options
- the list of options to parseException
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
public String getRevision()
getRevision
in interface RevisionHandler
Copyright © 2018 University of Waikato, Hamilton, NZ. All Rights Reserved.