c_PAMK: Partitioning Around Medoids with k Estimation

View source: R/c_PAMK.R

c_PAMKR Documentation

Partitioning Around Medoids with k Estimation

Description

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

Usage

c_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

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

usepam

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

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.

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

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

do.swap

Logical: If TRUE, perform the swap phase. See fpc::pam for more info

trace

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

verbose

Logical: If TRUE, print messages to console

...

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

Value

rtClust object

Author(s)

E.D. Gennatas

See Also

Other Clustering: c_CMeans(), c_DBSCAN(), c_EMC(), c_H2OKMeans(), c_HARDCL(), c_HOPACH(), c_KMeans(), c_MeanShift(), c_NGAS(), c_PAM(), c_SPEC()


egenn/rtemis documentation built on May 4, 2024, 7:40 p.m.