greed | R Documentation |
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.
greed(X, model = find_model(X), K = 20, alg = Hybrid(), verbose = FALSE)
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 |
K |
initial number of cluster |
alg |
an optimization algorithm of class |
verbose |
boolean value for verbose mode |
an IclPath-class
object
Other DlvmModels:
CombinedModels
,
DcLbm
,
DcSbm
,
DiagGmm
,
DlvmPrior-class
,
Gmm
,
Lca
,
MoM
,
MoR
,
MultSbm
,
Sbm
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.