reAssign {QuantileGH} | R Documentation |
Re-Assign Observations Trimmed Prior to Trimmed k
-Means Clustering
Description
Re-assign the observations,
which are trimmed in the trimmed k
-means algorithm,
back to the closest cluster as determined by the smallest
Mahalanobis distance.
Usage
reAssign(x, ...)
## S3 method for class 'tkmeans'
reAssign(x, ...)
Arguments
x |
a tkmeans object |
... |
potential parameters, currently not in use. |
Details
Given the tkmeans input, the mahalanobis distance is computed between each trimmed observation and each cluster. Each trimmed observation is assigned to the closest cluster (i.e., with the smallest Mahalanobis distance).
Value
Function reAssign.tkmeans returns an 'reAssign_tkmeans'
object,
which inherits from tkmeans class.
Note
Either kmeans or tkmeans is slow for big x
.
Examples
library(tclust)
data(geyser2)
clus = tkmeans(geyser2, k = 3L, alpha = .03)
plot(clus, main = 'Before Re-Assigning')
plot(reAssign(clus), main = 'After Re-Assigning')
[Package QuantileGH version 0.1.7 Index]