Questions tagged [mclust]

mclust is an R package for normal mixture modeling via EM, model-based clustering, classification, and density estimation.

mclust is an R package that provides functions for parameter estimation via the EM algorithm for normal mixture models with a variety of covariance structures, and functions for simulation from these models. Also included are functions that combine model-based hierarchical clustering, EM for mixture estimation and the Bayesian Information Criterion (BIC) in comprehensive strategies for clustering, density estimation and discriminant analysis.

Resourses

47 questions
8
votes
1 answer

How can I write the clustering results from mclust to file?

I'm using the mclust library for R ( http://www.stat.washington.edu/mclust ) to do some experimental EM-based GMM clustering. The package is great and seems to generally find very good clusters for my data. The problem is that I don't really know R…
si28719e
  • 2,135
  • 5
  • 20
  • 22
4
votes
0 answers

R package development: testthat fails because of not verified subfunction in Mclust package

I am developing an R package and testthat library is applied for verification. The error issue happens when loading function from external Mclust package (https://cran.r-project.org/web/packages/mclust/index.html) that includes anonymous function…
madk00k
  • 71
  • 5
3
votes
0 answers

Difference between Mclust in R and Gaussian Mixture in sklearn

I was performing Gaussian Mixture modeling to find clusters within my dataset. First I used sklearn's Gaussian Mixture class and learned that 3 clusters was the optimal number according to BIC. from sklearn.mixture import GaussianMixture as GMM from…
Jack Armstrong
  • 1,182
  • 4
  • 26
  • 59
2
votes
2 answers

R Mclust(data, G = 1) giving weird Sigma outputs if one variable is 'too constant'?

I'm trying to estimate Mu and Covariance of values assuming single normal distribution using MClust(, G = 1). I think it works fine most of the time. But if one of the variables consists of a repeated constant (e.g. all 0s, all 5s, etc.), it affects…
Civil
  • 59
  • 1
  • 7
2
votes
0 answers

LPA - model selection based on BIC with function prior=priorControl()

I'm trying to fit models for latent profile analysis (packages: tidyLPA and mclust). For model VVI (variances=equal, covariances=zero), I get many "NA" for BIC when n_profiles > 5. I figured out that function "prior = priorControl()" can possibly…
Jennifer
  • 21
  • 1
2
votes
1 answer

visualizing clusters extracted from MClust using ggplot2

I am analysing the distribution of my data using mclust (follow-up to Clustering with Mclust results in an empty cluster) Here my data for download https://www.file-upload.net/download-14320392/example.csv.html First, I evaluate the clusters present…
Jara
  • 57
  • 6
2
votes
1 answer

Clustering with Mclust results in an empty cluster

I am trying to cluster my empirical data using Mclust. When using the following, very simple code: library(reshape2) library(mclust) data <- read.csv(file.choose(), header=TRUE, check.names = FALSE) data_melt <- melt(data, value.name = "value",…
Jara
  • 57
  • 6
2
votes
0 answers

Error in grid.Call.graphics(C_polygon, x$x, x$y, index) : invalid color name in 'cluster' (package Mclust)

I use the Model Based Clustering from the package mclust for a subset of my data set. MClust recommended 1 cluster. The following error was displayed in the graphical display: WKA_ohneJB <- read.csv("WKA_ohneJB_PCA.csv", header=TRUE, sep = ";",…
Kitty123
  • 171
  • 2
  • 12
1
vote
0 answers

How to create this scatter plot with clusters in mclust package in r?

library(tidyverse) library(mclust) mc <- Mclust(iris[,-5]) pairs(mc$data, pch = mc$classification) This figure gives me all pairs of multiple scatter plots of K = 2 clusters for Iris data. Now I want to focus on Sepal.Length VS Sepal.Width, and add…
Mariana
  • 161
  • 5
1
vote
0 answers

Can someone demonstrate the effects of the argument initialization of the Mclust or densityMclust function?

My problem is that I can't find good examples for the effects of the argument initialization of the Mclust or densityMclust function? I like to optimize/change the fitting of the clusters and I hope that the argument initialization could be an…
1
vote
1 answer

Reproducibility of BIC results in latent class analysis via mclust package in R

I am conducting a latent class analysis in R using the mclust package. I supplied codes for BIC to select the best fitting model or optimal number of classes, but noticed that the solution is not reproducible since it gives inconsistent output any…
T Richard
  • 525
  • 2
  • 9
1
vote
0 answers

Mclust (GMM) graphics are too tiny (matrix of graohics)

It's just that I'm trying to know the number of clusters when I make use of GMM method in a dataset (specifically the dataset of asteroids of nasa) but I can't get to understand how to plot every graphic by themself and not in a matrix For example…
1
vote
1 answer

Is there a way to remove points from a Mclust classification plot in R?

I am trying to plot the GMM of my dataset using the Mclust package in R. While the plotting is a success, I do not want points to show in the final plot, just the ellipses. For a reference, here is the plot I have obtained: GMM Plot But, I want the…
sumit808
  • 23
  • 4
1
vote
0 answers

Using mclust on data from .mat file

I'm new to R, and I'm trying to use the mclust package. What I need to do is to take data from data.mat file and cluster it using mclust. The code I use is: data <- readMat('data.mat') mod1 <- Mclust(data['X'], modelName='EVE') And I get the…
Shahaf Finder
  • 604
  • 1
  • 4
  • 11
1
vote
1 answer

Clusterization, Mclust(), extracting the clusters - R

I'm using mclust::Mclust() function to cluster a small dataset. However, I'm struggling with extracting the clustering classification for each data to put into the dataset. Here is the data: df <- structure(list(latitud = c(-43.8189010620117,…
Chris
  • 2,019
  • 5
  • 22
  • 67
1
2 3 4