kmeans.ct: Continuous-time k-means clustering

View source: R/kmeans.ct.R

kmeans.ctR Documentation

Continuous-time k-means clustering

Description

A continuous-time version of k-means clustering in which each clusters is a time segments or set of time segments.

Usage

kmeans.ct(
  fdobj,
  k,
  common_trend = FALSE,
  init.pts = NULL,
  tol = 0.001,
  max.iter = 100
)

Arguments

fdobj

continuous-time multivariate data set of class "fd"

k

number of clusters

common_trend

logical: Should the curves be centered with respect to the mean function? Defaults to FALSE.

init.pts

a set of k time points. The observations at these time points serve as initial values for the k means. Randomly generated if not supplied.

tol

convergence tolerance for the k means

max.iter

maximum number of iterations

Value

Object of class "kmeans.ct", a list consisting of

fdobj

the supplied fdobj

means

means of the k clusters

transitions

transition points between segments

cluster

cluster memberships in the segments defined by the transitions

Author(s)

Biplab Paul <paul.biplab497@gmail.com> and Philip Tzvi Reiss <reiss@stat.haifa.ac.il>

See Also

plot.kmeans.ct

Examples


require(fda)
data(CanadianWeather)
daybasis <- create.bspline.basis(c(0,365), nbasis=55)
tempfd <- smooth.basis(day.5, CanadianWeather$dailyAv[,,"Temperature.C"], daybasis)$fd
kmtemp3 <- kmeans.ct(tempfd, 3)
plot(kmtemp3)


ctmva documentation built on July 26, 2023, 5:18 p.m.