public class DiscreteExponentialFamilyMixture extends DiscreteMixture
DiscreteMixture.Component
Modifier and Type | Field and Description |
---|---|
double |
bic
The BIC score when the distribution is fit on a sample data.
|
double |
L
The log-likelihood when the distribution is fit on a sample data.
|
components
Constructor and Description |
---|
DiscreteExponentialFamilyMixture(DiscreteMixture.Component... mixture)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static DiscreteExponentialFamilyMixture |
fit(int[] x,
DiscreteMixture.Component... components)
Fits the mixture model with the EM algorithm.
|
static DiscreteExponentialFamilyMixture |
fit(int[] x,
DiscreteMixture.Component[] components,
double gamma,
int maxIter,
double tol)
Fits the mixture model with the EM algorithm.
|
bic, cdf, entropy, length, logp, map, mean, p, posteriori, quantile, rand, size, toString, variance
likelihood, logLikelihood, logp, p, quantile, randi, randi
inverseTransformSampling, quantile, quantile, rejection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
likelihood, logLikelihood, rand, sd
public final double L
public final double bic
public DiscreteExponentialFamilyMixture(DiscreteMixture.Component... mixture)
mixture
- a list of discrete exponential family distributions.public static DiscreteExponentialFamilyMixture fit(int[] x, DiscreteMixture.Component... components)
components
- the initial configuration of mixture. Components may have
different distribution form.x
- the training data.public static DiscreteExponentialFamilyMixture fit(int[] x, DiscreteMixture.Component[] components, double gamma, int maxIter, double tol)
components
- the initial configuration.x
- the training data.gamma
- the regularization parameter.maxIter
- the maximum number of iterations.tol
- the tolerance of convergence test.