fit_mixture: Fit an MVN mixture model using mclust

View source: R/clustering.R

fit_mixtureR Documentation

Fit an MVN mixture model using mclust

Description

Can handle 1D as well as multivariate clustering. dat must have nrow observation and ncol dimensions, even if the number of dimensions is 1. Uses BIC to determine the best number of components, up to max.components.

Usage

fit_mixture(dat, max.components = 10)

Arguments

dat

a MATRIX or dataframe containing the observations to cluster.

max.components

A postive integer specifying the maximum number of components to fit in the mixture.

Value

list containing selected output from mclust:

G

the best number of components G.

probs

vector of cluster probabilities (mixing weights).

Mean

matrix of cluster means.

Sigma

array of cluster covariance matrices.

BIC

The BIC of the chosen mixture.

ModelName

The model name from the package mclust.


OxfordRSE/trachomAMIS documentation built on Aug. 1, 2022, 10:21 p.m.