tkmeans_clust {ICSClust}R Documentation

Trimmed k-means clustering

Description

Wrapper for performing trimmed k-means clustering from tclust::tkmeans().

Usage

tkmeans_clust(X, k, clusters_only = FALSE, alpha = 0.05, ...)

Arguments

X

a numeric matrix or data frame of the data. It corresponds to the argument x.

k

the number of clusters searched for. It corresponds to the argument k.

clusters_only

boolean. If TRUE only the partition of the data is returned as a vector. If FALSE the usual output of the tkmeans function is returned.

alpha

the proportion of observations to be trimmed.

...

other arguments to pass to the tclust::tkmeans()

Value

If clusters_only is TRUE a vector of the new partition of the data is returned, i.e a vector of integers (from 1:k) indicating the cluster to which each observation is allocated. 0 indicates trimmed observations.

Otherwise a list is returned with the following components:

clust_method

the name of the clustering method, i.e. "tkmeans".

clusters

the vector of the new partition of the data, i.e. a vector of integers (from 1:k) indicating the cluster to which each observation is allocated. 0 indicates trimmed observations.

...

an object of class "tkmeans"

.

Author(s)

Aurore Archimbaud

See Also

tclust::tkmeans()

Examples

tkmeans_clust(iris[,1:4], k = 3, alpha = 0.1, clusters_only = TRUE)

[Package ICSClust version 0.1.0 Index]