clusPath: Constructs tours of data space based on centers of clusters

clusPathR Documentation

Constructs tours of data space based on centers of clusters

Description

Constructs tours of data space based on centers of clusters

Usage

kmeansPath(data, length = 10, reorder = TRUE, conditionvars = NULL, ...)

pamPath(
  data,
  length = 10,
  reorder = TRUE,
  conditionvars = NULL,
  maxn = 4000,
  ...
)

claraPath(data, length = 10, reorder = TRUE, conditionvars = NULL, ...)

medoidPath(data, cl, reorder = FALSE)

centroidPath(data, cl, reorder = FALSE)

Arguments

data

A dataframe

length

Path length, defaults to 10

reorder

If TRUE uses DendSer to reorder the path dser

conditionvars

A vector of variable names. The returned tour is for this subset of variables.

...

ignored

maxn

(pamPath only) For datasets with more than maxn rows, use maxn randomly selected rows.

cl

A vector specifying cluster membership for rows of data.

Value

A dataframe with the path

Functions

  • kmeansPath(): Constructs a tour of data space following length k-means centroids

  • pamPath(): Constructs a tour of data space following length pam medoids

  • claraPath(): Constructs a tour of data space following length clara medoids

  • medoidPath(): Returns a path visiting cluster medoids

  • centroidPath(): Returns a path visiting cluster centroids

Examples

kmeansPath(mtcars,length=4)
pamPath(mtcars,length=4)
claraPath(mtcars,length=4)
medoidPath(mtcars,cl=rep(1:3, length.out=nrow(mtcars)))

condvis2 documentation built on Sept. 14, 2022, 5:06 p.m.