Description Usage Arguments Value Author(s) Examples
This is a convenient wrapper to Kmeans and Hierarchical clustering when using the 'tms' package.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
dat |
a (denoised) data matrix with |
timepoints |
a vector of time points for columns of dat. While this is not necessary, it's here for now to remind the user about the analysis pipeline. |
K |
a number of clusters. |
dist.method |
a distance method for time course data, resulting in a |
cluster.method |
a clustering method. |
hclust.algorithm |
an algorithm used in hierarchical clustering. See |
kmeans.algorithm |
an algorithm used in kmeans clustering. See |
center.dat |
a logical specifying to center the input and denoised data. By default, |
scale.dat |
a logical specifying to scale the input and denoised data. By default, |
verbose |
a logical specifying to print the computational progress. By default, |
seed |
a seed for the random number generator. |
... |
optional arguments. |
cluster
returns a list consisting of
dat.dtw |
|
cluster.obj |
an object returned from clustering the predicted data. |
membership |
a vector of length |
Neo Christopher Chung nchchung@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
## load the example "coptm" data
data(cys_optm)
meta <- cys_optm[,1:4]
optm <- log(cys_optm[meta$Select,5:10])
optm <- t(scale(t(optm), scale=TRUE, center=TRUE))
days <- as.numeric(colnames(optm))
## denoise using the cubic splines
denoised_optm <- denoise_spline(optm, timepoints = days, dof="cv", verbose=FALSE)
## cluster the denoised data using K-means clustering
clustered_optm <- cluster(denoised_optm,
timepoints = days,
cluster.method = "kmeans",
K=6,
center.dat = TRUE,
scale.dat = FALSE,
verbose = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.