pamCluster {Evacluster} | R Documentation |
Partitioning Around Medoids (PAM) Clustering
Description
This function partitions (clustering) of the data into k clusters "around medoids". In contrast to the k-means algorithm, this clustering methods chooses actual data points as centers
Usage
pamCluster(data = NULL, ...)
Arguments
data |
A Data set |
... |
k: The number of clusters |
Value
A list of cluster labels and a R object of class "pam cluster"
Examples
library(datasets)
data(iris)
rndSamples <- sample(nrow(iris),100)
trainData <- iris[rndSamples,]
testData <- iris[-rndSamples,]
cls <- pamCluster(trainData[,1:4],3)
[Package Evacluster version 0.1.0 Index]