public class UnivariateMixtureEstimator.MM
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_K
The number of actual components
|
protected double[] |
m_LogPriors
The priors, on log scale
|
protected double[] |
m_Means
Means
|
protected double[] |
m_StdDevs
Standard deviations
|
| Constructor and Description |
|---|
MM() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
estimateParameters(double[] values,
double[] weights,
double[][] probs)
Estimate parameters.
|
void |
initializeModel(int K,
double[] values,
double[] weights,
java.util.Random r)
Initializes the model.
|
double |
logDensity(double value)
Computes log of density for given value.
|
protected double[] |
logJointDensities(double value)
Joint densities per cluster.
|
double |
loglikelihood(double[] values,
double[] weights)
Computes loglikelihood of current model.
|
protected double |
logNormalDens(double x,
double mean,
double stdDev)
Density function of normal distribution.
|
double |
MSE()
Returns average of squared errors for current model.
|
protected int |
nearestMean(double val)
Returns the index of the nearest mean.
|
double[][] |
predictIntervals(double conf)
Returns the interval for the given confidence value.
|
double |
predictQuantile(double percentage)
Returns the quantile for the given percentage.
|
protected double |
smallestDistance(double val)
Returns smallest distance to given elements.
|
java.lang.String |
toString()
Returns string describing the estimator.
|
protected double[] m_Means
protected double[] m_StdDevs
protected double[] m_LogPriors
protected int m_K
public java.lang.String toString()
toString in class java.lang.Objectprotected double smallestDistance(double val)
protected int nearestMean(double val)
public void initializeModel(int K,
double[] values,
double[] weights,
java.util.Random r)
protected void estimateParameters(double[] values,
double[] weights,
double[][] probs)
public double loglikelihood(double[] values,
double[] weights)
public double MSE()
protected double logNormalDens(double x,
double mean,
double stdDev)
protected double[] logJointDensities(double value)
public double logDensity(double value)
public double[][] predictIntervals(double conf)
conf - the confidence value in the interval [0, 1]public double predictQuantile(double percentage)
percentage - the percentage