cluster_algorithm {GSgalgoR}R Documentation

Wrapper function to perform partition around medioids (PAM) for GalgoR

Description

In GSgalgoR, the partition around medioids (PAM) algorithm is the default clustering process used under the evolutionary process.

Usage

cluster_algorithm(c, k)

Arguments

c

a dissimilarity matrix object of type 'dist'

k

positive integer specifying the number of clusters, less than the number of observations

Details

The function runs the pam function of the 'cluster' package with options cluster.only =TRUE, diss = TRUE, do.swap=TRUE, keep.diss=FALSE, keep.data = FALSE, pamonce= 2

Value

Returns a 'list' with the value '$cluster' which contains the cluster assignment of each of the samples evaluated

References

Examples

# load example dataset
require(iC10TrainingData)
require(pamr)
data(train.Exp)

calculate_distance <- select_distance(distancetype = "pearson")
Dist <- calculate_distance(train.Exp)
k <- 4
Pam <- cluster_algorithm(Dist, k)
table(Pam$cluster)

[Package GSgalgoR version 1.3.1 Index]