Class EMModel

  • All Implemented Interfaces:
    Model, PrototypeModel<double[]>, elki.result.textwriter.TextWriteable

    public class EMModel
    extends MeanModel
    Cluster model of an EM cluster, providing a mean and a full covariance Matrix.
    Since:
    0.2
    Author:
    Erich Schubert
    • Field Detail

      • covarianceMatrix

        private double[][] covarianceMatrix
        Cluster covariance matrix
    • Constructor Detail

      • EMModel

        public EMModel​(double[] mean,
                       double[][] covarianceMatrix)
        Constructor.
        Parameters:
        mean - Mean vector
        covarianceMatrix - Covariance matrix
    • Method Detail

      • writeToText

        public void writeToText​(elki.result.textwriter.TextWriterStream out,
                                java.lang.String label)
        Description copied from interface: PrototypeModel
        Implementation of TextWriteable interface.
        Specified by:
        writeToText in interface Model
        Specified by:
        writeToText in interface PrototypeModel<double[]>
        Specified by:
        writeToText in interface elki.result.textwriter.TextWriteable
        Overrides:
        writeToText in class SimplePrototypeModel<double[]>
        Parameters:
        out - Output steam
        label - Optional label to prefix
      • getCovarianceMatrix

        public double[][] getCovarianceMatrix()
        Returns:
        covariance matrix
      • setCovarianceMatrix

        public void setCovarianceMatrix​(double[][] covarianceMatrix)
        Parameters:
        covarianceMatrix - covariance matrix