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
0
votes
0 answers

Error when transforming a scale gives and infinite value, both on y-axis and x-axis

For making a scatterplot of a flow cytometry experiment, I used the following code for the last few weeks. While running the code, I did not receive a significant amount of errors (only 20 out of 10,000 entries were removed from the dataset). visual…
LiWa
  • 51
  • 2
0
votes
1 answer

How to create this multiple scatter plots in mclust package in r?

I use MCLUST and specifically specify K=3 clusters, with the covariance matrix type is VII. library(mclust) mc <- Mclust(iris[,-5], G = 2) How to create a figure like below? It's from my textbook: Applied Multivariate Statistical Analysis by…
Mariana
  • 161
  • 5
0
votes
0 answers

Connection Error when using Foreach loop in R

I'm using a foreach loop to try and speed up some data processing I'm doing. I'd upload the full code, but its about 2k lines long so that doesn't seem worthwhile. Basically, I have a bunch of matrices (15 wide and 300 to 1500 long) that I need to…
PSB
  • 39
  • 7
0
votes
0 answers

Parallel Processing packages in R with user function and multiple outcomes

I'm working on trying to make my model fitting procedure in R more efficient. Currently, I have all of my data generated with 1500 sims for 15 variables. This data is stored in an array, with each level being one sim, each row being one "person" and…
PSB
  • 39
  • 7
0
votes
0 answers

Setting cluster id in MClust

When I cluster a dataset using MClust, I use the following code- i = 2 print(paste("Number of clusters =", i)) cluster_model1 <- Mclust(cc[2:6], G=i) When I repeat the clustering, the cluster classification (id) in each iteration can remain the…
Misha
  • 379
  • 1
  • 2
  • 12
0
votes
0 answers

Mclust freezes with small dataset

I am trying to use the Mclust() function from the R-package mclust on a dataset with 500 observations and 2 variables, and I want to identify 2 clusters. > head(data) x y 1 0.9929185 -1.9662945 2 8.2259360 -0.7240049 3 …
fstermann
  • 23
  • 4
0
votes
1 answer

How to calculate probability density for individual and for combined components from me.weighted()

I am using Mclust to estimate probability of component membership, but "density" is not included in the output from me.weighted(). Consequently, I am unable to plot probability density. The following code is lengthy because I want to clearly…
JPollock
  • 53
  • 4
0
votes
0 answers

zero inflated gaussian mixture model

Are there any extensions to mclust, or another R package, which can model zero inflated continuous data? Mclust can't handle the inflated 0s, see code below. library(tidyverse) library(mclust) n <- 250 y0 <- rep(0,n) y1 <- rnorm(n/2,4,0.5) y2 <-…
Zeus
  • 1,496
  • 2
  • 24
  • 53
0
votes
1 answer

Cluster contains no observations

I implemented a Cluster Solution in production with Mclust / GMM. The algorithm is running on initial data and the solution will be applied on unseen data (predict.Mclust). It worked fine and now it gives me a different solution when I run the…
0
votes
1 answer

Installation of mclust package v5.4.6 on R v4.0.1 on Ubuntu v20.04 hangs

Upon executing 'Rscript -e "install.packages('mclust')"` with R 4.0.1 on Ubuntu 20.04, the process hangs during package preparation. Any idea how to fix or debug this issue? ENV: R v4.0.1, GCC v9, Ubuntu v20.04 CMD: Rscript -e…
0
votes
1 answer

Simple way to gather information from model output

Consider this data frame: set.seed(123) dat1 <- data.frame(Region = rep(c("r1","r2"), each = 100), State = rep(c("NY","MA","FL","GA"), each = 10), Loc = rep(c("a","b","c","d","e","f","g","h"),each = 5), …
Ryan
  • 1,048
  • 7
  • 14
0
votes
2 answers

Installing mclust package problem. Installation is preparing for lazy loading and never finishes

After loading R 4.0.0 on Ubuntu 20.04. R version 4.0.0 (2020-04-24) -- "Arbor Day" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You…
marc1s
  • 779
  • 6
  • 24
0
votes
1 answer

Adding numeric list object of values with row.names to dataframe of same length without row.names

I have performed an operation using the mclust package on a nonmissing data frame. The nonmissing data frame was created using the dplyr package by using the select function. As such, row.names appears as a vector in the data frame passed to the…
Jhaltiga68
  • 125
  • 9
0
votes
1 answer

Error when running cluster analysis using mclust function in R

When running mclust on my test dataset, I get the following error: Error in cdensEEV(data = data, logarithm = TRUE, parameters = parameters, : NA/NaN/Inf in foreign function call (arg 1) In addition: Warning message: In cdensEEV(data = data,…
0
votes
1 answer

getting error in mclust-package while working on univariate fit

While working on a univariate fit using Mclust I am getting following error: Error in mstepE(data = as.matrix(data)[initialization$subset, ], z = z, : row dimension of z should equal data length I am using the code mentioned in: …
na ja
  • 45
  • 1
  • 2
  • 10