State initialization for iterative algorithms (randomly or variants of kmeans)
Initializes the state/cluster assignment either uniformly
at random from K classes, or using initial
kmeans++ (kmeanspp
) clustering (in
several variations on PLCs and/or FLCs).
initialize_states(num.states = NULL, num.samples = NULL, method = c("random", "KmeansPLC", "KmeansFLC", "KmeansPLCFLC", "KmeansFLCPLC"), LCs = list(PLC = NULL, FLC = NULL))
num.states |
number of states |
num.samples |
number of samples. |
method |
how to choose the labels: either uniformly
at random from \lbrace 1, …, K \rbrace or
using K-means on PLCs and FLCs or a combination.
Default: |
LCs |
(optional) a list of |
x1 <- rnorm(1000) x2 <- rnorm(200, mean = 2) yy <- c(x1, x2) ss <- initialize_states(num.states = 2, num.samples = length(yy), method = "KmeansFLC", LCs = list(FLCs = yy)) plot(yy, col = ss, pch = 19) points(x1, col = "blue")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.