funkmeans: Functional k-means clustering for parallel smooths

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function performs k-means clustering for curve estimates corresponding to each of a 3D grid of points. For example, when scatterplot smoothing is performed at each of a grid of brain voxels as in Reiss et al. (2014), this function can be used to cluster the obtained smooths.

Usage

1
2
funkmeans(fdobj, deriv = 1, lambda = 0, ncomp, centers, nstart = 10,
  store.fdobj = TRUE)

Arguments

fdobj

a functional data object, of class "fd", defining the set of curves being clustered.

deriv

which derivative of the curves should be clustered. If 0, the curves themselves are clustered; if 1 (the default), their first derivatives are clustered, a natural way to assign curves of similar shape to the same cluster.

lambda

smoothing parameter for functional PCA as implemented by pca.fd.

ncomp

number of functional principal components.

centers

number of clusters.

nstart

number of randomly chosen sets of initial centers used by the kmeans function.

store.fdobj

logical: Should the input fd object be stored in the output? May wish to set to FALSE for large sets of smooths.

Details

The functional clustering algorithm consists of performing (i) functional principal component analysis of the curve estimates or their derivatives, followed by (ii) k-means clustering of the functional PC scores (Tarpey and Kinateder, 2003).

Value

An object of class "funkmeans", which is a list with elements:

cluster, centers, withinss, tots, tot.withinss, betweenness, size

see kmeans.

basis,coef

basis object and coefficient matrix defining the functional data object (see fd) for the curves that are clustered.

fpca

functional principal components object, output by pca.fd.

R2

proportion of variance explained by the k clusters.

Author(s)

Philip Reiss phil.reiss@nyumc.org, Lei Huang huangracer@gmail.com and Lan Huo

References

Alexander-Bloch, A. F., Reiss, P. T., Rapoport, J., McAdams, H., Giedd, J. N., Bullmore, E. T., and Gogtay, N. (2014). Abnormal cortical growth in schizophrenia targets normative modules of synchronized development. Biological Psychiatry, in press.

Reiss, P. T., Huang, L., Chen, Y.-H., Huo, L., Tarpey, T., and Mennes, M. (2014). Massively parallel nonparametric regression, with an application to developmental brain mapping. Journal of Computational and Graphical Statistics, Journal of Computational and Graphical Statistics, 23(1), 232–248.

Tarpey, T., and Kinateder, K. K. J. (2003). Clustering functional data. Journal of Classification, 20, 93–114.

See Also

funkmeans4d

Examples

1
2
3
4
5
6
data(test)
d4 = test$d4
x = test$x
semi.obj = semipar4d(d4, ~sf(x), -5:5, data.frame(x = x))
fdobj = extract.fd(semi.obj)
fkmobj = funkmeans4d(fdobj, d4, ncomp=6, centers=3)

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