Skip to content
Back to skills

Mclust

ASecurity

R mclust package for model-based clustering. Use for Gaussian mixture models and model-based clustering.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 4, 2026
datago

Security analysis

A100/100

Scanned June 4, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill mclust --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mclust?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mclust
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-mclust/badge)](https://www.skillsdirectory.com/skills/leolin990405-mclust)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mclust
description: R mclust package for model-based clustering. Use for Gaussian mixture models and model-based clustering.
---

# mclust

Gaussian mixture modeling for model-based clustering.

## Basic Clustering

```r
library(mclust)

# Model-based clustering
mc <- Mclust(data)

# Summary
summary(mc)

# Results
mc$classification  # Cluster assignments
mc$G               # Number of clusters
mc$modelName       # Best model
mc$BIC             # BIC values
```

## Specify Clusters

```r
# Fixed number of clusters
mc <- Mclust(data, G = 3)

# Range of clusters
mc <- Mclust(data, G = 1:9)
```

## Model Selection

```r
# BIC plot
plot(mc, what = "BIC")

# Available models
# E = equal, V = variable
# I = spherical, E = diagonal, V = ellipsoidal
# EII, VII, EEI, VEI, EVI, VVI, EEE, EVE, VEE, VVE, EEV, VEV, EVV, VVV
```

## Visualization

```r
# Classification plot
plot(mc, what = "classification")

# Uncertainty plot
plot(mc, what = "uncertainty")

# Density plot
plot(mc, what = "density")

# All plots
plot(mc)
```

## Density Estimation

```r
# Density estimation
dens <- densityMclust(data)

# Plot
plot(dens, what = "density")
plot(dens, what = "persp")  # 3D
```

## Discriminant Analysis

```r
# Model-based discriminant analysis
mda <- MclustDA(train_data, train_labels)

# Predict
pred <- predict(mda, newdata = test_data)
pred$classification
```

## Dimension Reduction

```r
# Cluster with dimension reduction
mc <- MclustDR(data)

# Plot
plot(mc, what = "pairs")
plot(mc, what = "boundaries")
```

## Bootstrap

```r
# Bootstrap LRT
boot <- mclustBootstrapLRT(data, modelName = "VVV")
boot
```

## ICL Criterion

```r
# ICL (Integrated Complete-data Likelihood)
mc <- Mclust(data)
icl <- mclustICL(data)
plot(icl)
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.