Learn R Programming

rtemis (version 0.79)

u.PAMK: Partitioning Around Medoids with k Estimation

Description

Estimate PAM clustering solution and optimal k using fpc::pamk

Usage

u.PAMK(x, krange = 2:10, criterion = "asw", usepam = ifelse(nrow(x) <
  2000, TRUE, FALSE), scaling = TRUE, diss = inherits(data, "dist"),
  metric = "euclidean", do.swap = TRUE, trace = 0, verbose = TRUE,
  ...)

Arguments

x

Input matrix / data.frame

krange

Integer vector: Range of k values to try

criterion

String: Criterion to use for selecting k: "asw", "multiasw" or "ch". See fpc::pamk

usepam

Logical: If TRUE, use cluster::pam, otherwise use cluster::clara. Default = TRUE

scaling

Logical or Numeric vector: If TRUE, scale input. If numeric vector of length equal to number of features, the features are divided by the corresponding value. Default = TRUE

diss

Logical: If TRUE, treat x as a dissimilarity matrix, otherwise as a matrix of cases by features. Default = TRUE, if x inherits from class dist, FALSE otherwise.

metric

String: Dissimilarity metric to be used. Options: 'euclidean', 'manhattan'

do.swap

Logical: If TRUE, perform the swap phase (See cluster::pam), as in the original PAM algorithm. This is computationally intensive and can be skipped. Default = TRUE

trace

Integer [0, 3]: Trace level for fpc::pamk

verbose

Logical: If TRUE, print messages to screen

...

Additional parameters to be passed to fpc::pamk and/or cluster::pam

Value

rtClust object

See Also

Other Clustering: u.CMEANS, u.EMC, u.H2OKMEANS, u.HARDCL, u.HOPACH, u.KMEANS, u.NGAS, u.PAM, u.SPEC