Description Usage Arguments Value
View source: R/optimizer_batch.R
run clusterwise linear mixed effects model with K clusters on the given data. This function uses a batch approach where the cost are calculated along all rows and the affectation is made to minimize this cost, after that the k models are adjusted.
1 2 3 4 5 6 7 8 | optimizer_batch(
data,
target,
K,
formula,
nb_iterations = 100,
initialization = NULL
)
|
data |
data frame containing the variables named in |
target |
vector containing the target variable. |
K |
number of clusters. |
formula |
a two sided linear formula object corresponding to |
nb_iterations |
maximum number of iterations. |
initialization |
if vector of the same length of data, use this vector as clustering initialization. Otherwise, do a random initialization. |
list containing the models as a class of clmm, the final clustering and the final cost.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.