info_clust: Description of a set of partitions

Description Usage Arguments Details Value See Also Examples

View source: R/info_clust.R

Description

This function computes descriptive statistics of the clustering produced with group-sparse weighted k-means on numerical data, or with sparse weighted k-means on mixed data. It displays the average of the numerical variables per cluster, and the relative frequencies of the levels in the categorical variables per cluster.

Usage

1
info_clust(out, which.lambda, X)

Arguments

out

an object of class spwkm.

which.lambda

an integer or a vector of integers selecting the clusterings for which summaries are computed.

X

a matrix or a data frame. The initial data set.

Details

The values in which.lambda must be integers between 1 and length(out$lambda). One may thus select the clusterings corresponding to specific regularization parameters, or the whole set of clusterings obtained for the whole grid of out$lambda.

Value

mean.by.clust

a list of numerical matrices. Each matrix contains the mean values of the numerical variables computed per cluster, for a given value of the regularization parameter.

freq.by.clust

a list of numerical matrices. Each matrix contains the relative frequencies of each level associated to categorical variables, computed per cluster and for a given value of the regularization parameter.

lambda

a scalar or a numerical vector. The selected values of the regularization parameter.

See Also

groupsparsewkm, sparsewkm

Examples

1
2
3
data(HDdata)
out <- sparsewkm(X = HDdata[,-14], centers = 2)
info_clust(out, which.lambda=c(1,10,20), X = HDdata[,-14])

vimpclust documentation built on Jan. 8, 2021, 5:34 p.m.