Class TwoPassMultivariateGaussianModel

  • All Implemented Interfaces:
    EMClusterModel<NumberVector,​EMModel>

    public class TwoPassMultivariateGaussianModel
    extends java.lang.Object
    implements EMClusterModel<NumberVector,​EMModel>
    Model for a single Gaussian cluster, using two-passes for slightly better numerics.

    This is the more classic approach, but the savings in numerical precision are usually negligible, since we already use a very stable and fast approach.

    Since:
    0.7.5
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) CholeskyDecomposition chol
      Decomposition of covariance matrix.
      (package private) double[][] covariance
      Covariance matrix.
      (package private) double logNorm
      Normalization factor.
      (package private) double logNormDet
      Normalization factor.
      (package private) double[] mean
      Mean vector.
      (package private) double[][] priormatrix
      Matrix for prior conditioning.
      (package private) double[] tmp
      Temporary storage, to avoid reallocations.
      (package private) double weight
      Weight aggregation sum.
      (package private) double wsum
      Weight aggregation sum.
    • Field Detail

      • mean

        double[] mean
        Mean vector.
      • covariance

        double[][] covariance
        Covariance matrix.
      • tmp

        double[] tmp
        Temporary storage, to avoid reallocations.
      • logNorm

        double logNorm
        Normalization factor.
      • logNormDet

        double logNormDet
        Normalization factor.
      • weight

        double weight
        Weight aggregation sum.
      • wsum

        double wsum
        Weight aggregation sum.
      • priormatrix

        double[][] priormatrix
        Matrix for prior conditioning.
    • Constructor Detail

      • TwoPassMultivariateGaussianModel

        public TwoPassMultivariateGaussianModel​(double weight,
                                                double[] mean)
        Constructor.
        Parameters:
        weight - Cluster weight
        mean - Initial mean
      • TwoPassMultivariateGaussianModel

        public TwoPassMultivariateGaussianModel​(double weight,
                                                double[] mean,
                                                double[][] covariance)
        Constructor.
        Parameters:
        weight - Cluster weight
        mean - Initial mean
        covariance - initial covariance matrix