kmeans.ct {ctmva} | R Documentation |
Continuous-time k-means clustering
Description
A continuous-time version of k-means clustering in which each cluster 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 |
k |
number of clusters |
common_trend |
logical: Should the curves be centered with respect to the mean function?
Defaults to |
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 |
means |
means of the k clusters |
transitions |
transition points between segments |
cluster |
cluster memberships in the segments defined by the transitions |
size |
length of each cluster, i.e. sum of lengths of subintervals making up each cluster |
totisd |
total integrated sum of distances from the overall mean; this is the analogue of |
withinisd |
within-cluster integrated sum of distances, i.e. integrated sum of distances from each cluster mean |
tot.withinisd |
total within-cluster integrated sum of distances, i.e. |
betweenisd |
between-cluster integrated sum of distances, i.e. |
Author(s)
Biplab Paul <paul.biplab497@gmail.com> and Philip Tzvi Reiss <reiss@stat.haifa.ac.il>
See Also
Examples
## Not run:
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, axes=FALSE)
axesIntervals(); box()
plot(silhouette.ct(kmtemp3), axes=FALSE)
axesIntervals(); box()
## End(Not run)