info_clust {vimpclust}R Documentation

Description of a set of partitions

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

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

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

[Package vimpclust version 0.1.0 Index]