categorization: categorization

Description Usage Arguments Value Examples

View source: R/utils.R

Description

The function which classify by k-means the values of each column of X. Then, the values of each column is set to the center of its cluster.

Usage

1
categorization(X, nb_levels)

Arguments

X

The matrix data

np_levels

The vector of the number of clusters to build in each column.

Value

$clustered The cluster's average of each attribute of each alternative $category The cluster's number of each attribute of each alternative

Examples

1
2
3
4
5
X <- matrix(rnorm(30), ncol=3)
nb_levels <- c(3, 2, 2)
X_clustered <- categorization(X, nb_levels)$clustered
X_category <- categorization(X, nb_levels)$category
X_clustered; X_category

AntoineDubois/RUMdesignSimulator documentation built on Dec. 17, 2021, 8:53 a.m.