rcluster-computinggaussianexpectation-maximization

Extract parameters from EMCluster package


is there a way to extract parameters of the Gaussian distributions (mean and variance) using R's EMCluster package?


Solution

  • You can access memebers of emret object by Mu - for means and LTSigma for dispersions as follows:

    library(EMCluster)
    set.seed(123)
    x1 <- da1$da
    class(emobj)
    emobj <- simple.init(x1, nclass = 3)
    emobj$Mu
    #        [,1]       [,2]
    # [1,] 184.6037124  170.59132
    # [2,] 117.2505083 -134.48005
    # [3,]  -0.7252975  -18.01958
    
    emobj$LTSigma
    #        [,1]       [,2]       [,3]
    # [1,] 24649.929 21479.2133 28175.9235
    # [2,]  4971.433  1079.4590   569.7259
    # [3,]  2263.597  -413.6173  8381.9084