greed: Model based hierarchical clustering

View source: R/alg_classes.R

greedR Documentation

Model based hierarchical clustering

Description

This function is the main function for fitting Dlvms with greed. In the simplest case you may only provide a dataset and greed will find a suitable one. The accepted classes for X depends on the generative used which can be specified with the model argument. See the DlvmPrior-class and the derived classes for details.

Greed enables the clustering of networks and count data matrix with different models. Model selection and clustering are performed in combination by optimizing the Integrated Classification Likelihood. Optimization is performed thanks to a combination of greedy local search and a genetic algorithm. The main entry point is the greed function to perform the clustering, which is documented below. The package also provides sampling functions for all the implemented DLVMs.

Usage

greed(X, model = find_model(X), K = 20, alg = Hybrid(), verbose = FALSE)

Arguments

X

data to cluster either a data.frame, a matrix, an array, ... depending on the used generative model

model

a generative model to fit such as Gmm,Sbm,..

K

initial number of cluster

alg

an optimization algorithm of class Alg-class such as Hybrid-class (default), Multistarts-class, Seed-class or Genetic-class

verbose

boolean value for verbose mode

Value

an IclPath-class object

See Also

Other DlvmModels: CombinedModels, DcLbm, DcSbm, DiagGmm, DlvmPrior-class, Gmm, Lca, MoM, MoR, MultSbm, Sbm

Examples

sbm <- rsbm(50, c(0.5, 0.5), diag(2) * 0.1 + 0.01)
sol <- greed(sbm$x, model = Sbm())
table(sbm$cl,clustering(sol))

comeetie/greed documentation built on Oct. 10, 2022, 5:37 p.m.