ModelBasedVarSelClustering: Model-Based Clustering with Variable Selection

View source: R/ModelBasedVarSelClustering.R

ModelBasedVarSelClusteringR Documentation

Model-Based Clustering with Variable Selection

Description

Model-based clustering with variable selection and estimation of the number of clusters, based either on [Marbac/Sedki, 2017] and [Marbac et al., 2020] or on [Scrucca and Raftery, 2014].

Usage

ModelBasedVarSelClustering(Data,ClusterNo,Type,PlotIt=FALSE, ...)

Arguments

Data

A [1:n,1:d] matrix containing the dataset to be clustered. It consists of n cases of d-dimensional data points. Every case has d attributes, variables, or features.

ClusterNo

Numeric scalar defining the number of clusters to search for.

Type

Character scalar, either "VarSelLCM" [Marbac/Sedki, 2017; Marbac et al., 2020] or "clustvarsel" [Scrucca and Raftery, 2014].

PlotIt

Optional logical scalar. If TRUE, the clustering is plotted. The default is FALSE.

...

Further arguments passed to VarSelCluster or clustvarsel.

Value

A list with the following components:

Cls

A numerical vector of length n defining the classification. It has k unique values representing the arbitrary cluster labels.

Object

The object returned by the selected clustering algorithm.

Author(s)

Quirin Stier, Michael Thrun

References

[Marbac/Sedki, 2017] Marbac, M. and Sedki, M.: Variable selection for model-based clustering using the integrated complete-data likelihood. Statistics and Computing, 27(4), pp. 1049-1063, 2017.

[Marbac et al., 2020] Marbac, M., Sedki, M., and Patin, T.: Variable selection for mixed data clustering: application in human population genomics. Journal of Classification, Vol. 37(1), pp. 124-142, 2020.

Examples




# Hepta
data("Hepta")
Data <- Hepta$Data
V <- ModelBasedVarSelClustering(
  Data,
  ClusterNo = 7,
  Type = "VarSelLCM"
)
Cls <- V$Cls
ClusterAccuracy(Hepta$Cls, Cls, K = 7)

V <- ModelBasedVarSelClustering(
  Data,
  ClusterNo = 7,
  Type = "clustvarsel"
)
Cls <- V$Cls
ClusterAccuracy(Hepta$Cls, Cls, K = 7)


FCPS documentation built on Oct. 3, 2026, 9:06 a.m.