Learn R Programming

MagmaClustR (version 1.2.1)

ini_mixture: Mixture initialisation with kmeans

Description

Provide an initial kmeans allocation of the individuals/tasks in a dataset into a definite number of clusters, and return the associated mixture probabilities.

Usage

ini_mixture(data, k, name_clust = NULL, nstart = 50)

Value

A tibble indicating for each ID in which cluster it belongs after a kmeans initialisation.

Arguments

data

A tibble or data frame. Required columns: ID, Input , Output.

k

A number, indicating the number of clusters.

name_clust

A vector of characters. Each element should correspond to the name of one cluster.

nstart

A number of restart used in the underlying kmeans algorithm

Examples

Run this code
TRUE

Run the code above in your browser using DataLab