alg.VS: VS quantile-based clustering algorithm

View source: R/alg.VS.R

alg.VSR Documentation

VS quantile-based clustering algorithm

Description

This function allows to run the VS (Variable-wise theta_j and Scaled variables through lambda_j) version of the quantile-based clustering algorithm.

Usage

alg.VS(data, k = 2, eps = 1e-08, it.max = 100, B = 30, lambda = rep(1, p))

Arguments

data

A numeric vector, matrix, or data frame of observations. Categorical variables are not allowed. If a matrix or data frame, rows correspond to observations and columns correspond to variables.

k

The number of clusters. The default is k=2.

eps

The relative convergence tolerances for objective function. The default is set to 1e-8.

it.max

A number that gives integer limits on the number of the VS algorithm iterations. By default, it is set to 100.

B

The number of times the initialization step is repeated; the default is 30.

lambda

The initial value for lambda_j, the variable scaling parameters. By default, lambdas are set to be equal to 1.

Details

Algorithm VS: Variable-wise theta_j and Scaled variables via lambda_j. A different theta for every single variable is estimated to better accomodate different degree of skeweness in the data and variables are scaled through lambda_j.

Value

A list containing the following elements:

method

The chosen parameterization, VS, Variable-wise theta_j and Scaled variables

k

The number of clusters.

cl

A vector whose [i]th entry is classification of observation i in the test data.

qq

A matrix whose [h,j]th entry is the theta-quantile of variable j in cluster h.

theta

A vector whose [j]th entry is the percentile theta for variable j.

Vseq

The values of the objective function V at each step of the algorithm.

V

The final value of the objective function V.

lambda

A vector containing the scaling factor for each variable.

References

Hennig, C., Viroli, C., Anderlucci, L. (2019) "Quantile-based clustering" Electronic Journal of Statistics, 13 (2) 4849-4883 <doi:10.1214/19-EJS1640>

Examples

out <- alg.VS(iris[,-5],k=3)
out$theta
out$qq
out$lambda

table(out$cl)

QuClu documentation built on May 28, 2022, 1:22 a.m.

Related to alg.VS in QuClu...