getClusters {tscR} | R Documentation |
Compute clustering with pam function and a distance class object.
getClusters(x, k)
x |
Numeric distance object obtained with dimension n x n. |
k |
Numeric. Number of clusters |
This function is a wrapper of pam (cluster). x must be a dist object obtained from frechetdist, slopedist or any other distance metric on condition that it be an object of the dist class and has dimensions nxn, where n is equal to the number of trajectories.
Object of class 'pam'. See pam.object
for details
Fernando Pérez-Sanz (fernando.perez8@um.es)
Miriam Riquelme-Pérez (miriam.riquelmep@gmail.com)
data(tscR) data <- tscR time <- c(1,2,3) dist_tscR <- slopeDist(data, time) res.cluster <- getClusters(dist_tscR, 3)