plot.funkmeans: Plotting of k-means clustering results for massively parallel...

Description Usage Arguments Author(s) See Also Examples

Description

Visualization of functional k-means clustering as implemented by funkmeans.

Usage

1
2
3
4
5
## S3 method for class 'funkmeans'
plot(x, fdobj = NULL, deriv = 0,
  ncluster = nrow(x$centers), new.array = TRUE, mfrow = NULL,
  colvec = NULL, cex.mtext = 0.7, xlabs = "", ylabs = "", titles = "",
  ...)

Arguments

x

a functional k-means clustering object obtained from funkmeans.

fdobj

a functional data object, of class "fd", defining the set of curves being clustered. By default, this is taken to be x$fdobj; but if the latter is NULL, fdobj must be specified. See the two cases in the example.

deriv

which derivative to display in the plots, which show 30 randomly selected curves, along with the cluster center, from each cluster. By default, the "0th derivative" is used (i.e., the curves themselves).

ncluster

number of clusters to display. By default, all are displayed.

new.array

logical: if TRUE, plots will be displayed in an array whose dimensions are set by the mfrow argument.

mfrow

a vector of length 2 giving the numbers of rows and columns for the array of plots. By default, the number of rows will exceed the number of columns by 0 or 1, depending on ncluster.

colvec

a vector of colors for the clusters. By default, this is set to the first ncluster elements of c("dodgerblue", "green", "red", "orange", "yellow", "orchid", "brown", "grey", "purple"), if ncluster <= 9.

cex.mtext

magnification for mtext command to display the size of each cluster above the corresponding subfigure.

xlabs, ylabs, titles

?????NULL or a character vector of length 1 or ncluster, specifying titles (x axis, y axis, overall titles) for each cluster. If vector's length equals 1, each cluster plot has the same title. By default, it's NULL

...

arguments passed to plot.

Author(s)

Yin-Hsiu Chen enjoychen0701@gmail.com, Philip Reiss phil.reiss@nyumc.org, Lan Huo, and Ruixin Tan

See Also

funkmeans

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(test)
d4 = test$d4
x = test$x
semi.obj = semipar4d(d4, formula = ~sf(x), data = data.frame(x = x), lsp=-5:5)
myfdobj = extract.fd(semi.obj)

# Case 1: fd object is stored in funkmeans object...
fkmobj = funkmeans(myfdobj, ncomp = 8, centers = 6)
plot(fkmobj)

# Case 2: fd object is not stored...
fkmobj = funkmeans(myfdobj, ncomp = 8, centers = 6, store.fdobj=FALSE)
plot(fkmobj, myfdobj)

vows documentation built on May 2, 2019, 9:26 a.m.