smile.stat.distribution
Class MultivariateMixture
- java.lang.Object
-
- smile.stat.distribution.AbstractMultivariateDistribution
-
- smile.stat.distribution.MultivariateMixture
-
- All Implemented Interfaces:
- MultivariateDistribution
- Direct Known Subclasses:
- MultivariateExponentialFamilyMixture
public class MultivariateMixture extends AbstractMultivariateDistribution
The finite mixture of multivariate distributions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classMultivariateMixture.ComponentA component in the mixture distribution is defined by a distribution and its weight in the mixture.
-
Constructor Summary
Constructors Constructor and Description MultivariateMixture(java.util.List<MultivariateMixture.Component> mixture)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublebic(double[][] data)BIC score of the mixture for given data.doublecdf(double[] x)Cumulative distribution function.double[][]cov()The covariance matrix of distribution.doubleentropy()Shannon entropy.java.util.List<MultivariateMixture.Component>getComponents()Returns the list of components in the mixture.doublelogp(double[] x)The density at x in log scale, which may prevents the underflow problem.double[]mean()The mean vector of distribution.intnpara()The number of parameters of the distribution.doublep(double[] x)The probability density function for continuous distribution or probability mass function for discrete distribution at x.intsize()Returns the number of components in the mixture.java.lang.StringtoString()-
Methods inherited from class smile.stat.distribution.AbstractMultivariateDistribution
likelihood, logLikelihood
-
-
-
-
Constructor Detail
-
MultivariateMixture
public MultivariateMixture(java.util.List<MultivariateMixture.Component> mixture)
Constructor.- Parameters:
mixture- a list of multivariate distributions.
-
-
Method Detail
-
mean
public double[] mean()
Description copied from interface:MultivariateDistributionThe mean vector of distribution.
-
cov
public double[][] cov()
Description copied from interface:MultivariateDistributionThe covariance matrix of distribution.
-
entropy
public double entropy()
Shannon entropy. Not supported.
-
p
public double p(double[] x)
Description copied from interface:MultivariateDistributionThe probability density function for continuous distribution or probability mass function for discrete distribution at x.
-
logp
public double logp(double[] x)
Description copied from interface:MultivariateDistributionThe density at x in log scale, which may prevents the underflow problem.
-
cdf
public double cdf(double[] x)
Description copied from interface:MultivariateDistributionCumulative distribution function. That is the probability to the left of x.
-
npara
public int npara()
Description copied from interface:MultivariateDistributionThe number of parameters of the distribution.
-
size
public int size()
Returns the number of components in the mixture.
-
bic
public double bic(double[][] data)
BIC score of the mixture for given data.
-
getComponents
public java.util.List<MultivariateMixture.Component> getComponents()
Returns the list of components in the mixture.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG