| Modifier and Type | Class and Description |
|---|---|
| private static class | MultivariateNormalMixtureExpectationMaximization.
Class used for sorting user-supplied data. |
| Modifier and Type | Field and Description |
|---|---|
| private final double[][] | data
The data to fit. |
| private static final int | DEFAULT_MAX_ITERATIONS
Default maximum number of iterations allowed per fitting process. |
| private static final double | DEFAULT_THRESHOLD
Default convergence threshold for fitting. |
| private MixtureMultivariateNormalDistribution | fittedModel
The model fit against the data. |
| private double | logLikelihood
The log likelihood of the data given the fitted model. |
| Access | Constructor and Description |
|---|---|
| public | MultivariateNormalMixtureExpectationMaximization(double[][]
Data to use in fitting procedure data)Creates an object to fit a multivariate normal mixture model to data. |
| Modifier and Type | Method and Description |
|---|---|
| public static MixtureMultivariateNormalDistribution | Returns: Multivariate normal mixture model estimated from the dataData to estimate distribution data, final int Number of components for estimated mixture numComponents)Helper method to create a multivariate normal mixture model which can be
used to initialize |
| public void | fit(final MixtureMultivariateNormalDistribution
Model containing initial values of weights and
multivariate normals initialMixture, final int Maximum iterations allowed for fit maxIterations, final double Convergence threshold computed as difference in
logLikelihoods between successive iterations threshold)Fit a mixture model to the data supplied to the constructor. |
| public void | fit(MixtureMultivariateNormalDistribution
Model containing initial values of weights and
multivariate normals initialMixture)Fit a mixture model to the data supplied to the constructor. |
| public MixtureMultivariateNormalDistribution | Returns: fitted model ornull if no fit has been performed yet.Gets the fitted model. |
| public double | Returns: Log likelihood of data or zero of no data has been fitGets the log likelihood of the data under the fitted model. |
| data | back to summary |
|---|---|
| private final double[][] data The data to fit. | |
| DEFAULT_MAX_ITERATIONS | back to summary |
|---|---|
| private static final int DEFAULT_MAX_ITERATIONS Default maximum number of iterations allowed per fitting process. | |
| DEFAULT_THRESHOLD | back to summary |
|---|---|
| private static final double DEFAULT_THRESHOLD Default convergence threshold for fitting. | |
| fittedModel | back to summary |
|---|---|
| private MixtureMultivariateNormalDistribution fittedModel The model fit against the data. | |
| logLikelihood | back to summary |
|---|---|
| private double logLikelihood The log likelihood of the data given the fitted model. | |
| MultivariateNormalMixtureExpectationMaximization | back to summary |
|---|---|
| public MultivariateNormalMixtureExpectationMaximization(double[][] data) throws NotStrictlyPositiveException, DimensionMismatchException, NumberIsTooSmallException Creates an object to fit a multivariate normal mixture model to data.
| |
| estimate | back to summary |
|---|---|
| public static MixtureMultivariateNormalDistribution estimate(final double[][] data, final int numComponents) throws NotStrictlyPositiveException, DimensionMismatchException Helper method to create a multivariate normal mixture model which can be
used to initialize
| |
| fit | back to summary |
|---|---|
| public void fit(final MixtureMultivariateNormalDistribution initialMixture, final int maxIterations, final double threshold) throws SingularMatrixException, NotStrictlyPositiveException, DimensionMismatchException Fit a mixture model to the data supplied to the constructor. The quality of the fit depends on the concavity of the data provided to the constructor and the initial mixture provided to this function. If the data has many local optima, multiple runs of the fitting function with different initial mixtures may be required to find the optimal solution. If a SingularMatrixException is encountered, it is possible that another initialization would work.
| |
| fit | back to summary |
|---|---|
| public void fit(MixtureMultivariateNormalDistribution initialMixture) throws SingularMatrixException, NotStrictlyPositiveException Fit a mixture model to the data supplied to the constructor. The quality of the fit depends on the concavity of the data provided to the constructor and the initial mixture provided to this function. If the data has many local optima, multiple runs of the fitting function with different initial mixtures may be required to find the optimal solution. If a SingularMatrixException is encountered, it is possible that another initialization would work.
| |
| getFittedModel | back to summary |
|---|---|
| public MixtureMultivariateNormalDistribution getFittedModel() Gets the fitted model.
| |
| getLogLikelihood | back to summary |
|---|---|
| public double getLogLikelihood() Gets the log likelihood of the data under the fitted model.
| |
| Modifier and Type | Field and Description |
|---|---|
| private Double | mean
Mean of the data row. |
| private final double[] | row
One data row. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: int for sortingThe other row otherImplements java. Compare two data rows. |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. Indicates whether some other object is "equal to" this one. |
| public double[] | |
| public int |
| mean | back to summary |
|---|---|
| private Double mean Mean of the data row. | |
| row | back to summary |
|---|---|
| private final double[] row One data row. | |
| DataRow | back to summary |
|---|---|
| pack-priv DataRow(final double[] data) Create a data row.
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(final MultivariateNormalMixtureExpectationMaximization. Implements java. Compare two data rows.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getRow | back to summary |
|---|---|
| public double[] getRow() Get a data row.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |