make_Z_random: Start from random groups of similar size.

View source: R/make_Z_random.r

make_Z_randomR Documentation

Start from random groups of similar size.

Description

A large number (n) of observations are assigned randomly into (xq) clusters. It is recommended to repeat Multimix runs with a number of different seeds to search for a log-likelihood maximum.

Usage

make_Z_random(D, seed = NULL)

Arguments

D

an object of class multimixSettings – see data_organise for more information.

seed

a positive integer to use as a random number seed.

Details

Also consider making additional clusters from observations with low probabilities of belonging to any cluster in a previous clustering.

Value

a matrix of dimension n by q where n is the number of observations in D$dframe and q is the number of clusters in the model as specified by D$numClusters.

Examples

data(cancer.df)
D = data_organise(cancer.df, numClusters = 2)
Z = make_Z_random(D)
table(Z)

multimix documentation built on Jan. 22, 2023, 1:13 a.m.