initialize_fun: A function for initialization.

View source: R/initialize_fun.R

initialize_funR Documentation

A function for initialization.

Description

This function performs initialization of the class membership providing the option of using k-means start, ramdom start, and a small EM or gridsearch type of start: initial randomly on a given number of random starting points, and run for a given number of iterations, then pick the one that ends with highest approximated log-likelihood.

Usage

initialize_fun(W, G, K, n, method, nrep = NA, niter = NA, verb = FALSE)

Arguments

W

observation data: the count data, n*(K+1) matrix where K is the number of taxa.

G

number of component.

K

number of taxa.

n

number of observations.

method

string variable, could be "kmeans", "random", and "small_EM".

nrep

number of random starts. Only useful if method = "small_EM" is specified. default is 50.

niter

number of iterations for each small EM random start. Only useful if method = "small_EM" is specified. default is 10.

verb

logical variable. if is TRUE, each iteration of the small_EM start will be printed.

Examples

initialize_fun()

yuanfang90/LNMVGA documentation built on Jan. 29, 2024, 8:24 a.m.