knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Loads packages.

library(future) # allows parralel processing in greed()
library(greed)
library(mclust)
library(ggplot2)
set.seed(2134)

future::plan("multisession", workers=2) # may be increased 

In construction

Dummy example with 3 variables.

help("MoM")
K=2
mu = matrix(c(0.1, 0.7, 0.2, 0.8, 0.1, 0.1), byrow = T, nrow = 2, ncol = 3)
N=500
simu <- rmm(N=N, pi=rep(1/K, K), mu = mu, lambda = rep(200, N))
model = MoM(alpha = 1, beta = 1)
sol = greed(X = simu$x, model=model, alg = Hybrid())
table(simu$cl, clustering(sol))


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