Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/imputeSenators.R
Compute clustering with clara function to obtain a number of 'senators'
1 | imputeSenators(x, k = 100, ...)
|
x |
Numeric matrix or data.frame with trajectory values. Rows are trajectories, columns are time or similar. SummarizedExperiment object can be provided for compatibility with bioconductor container (for more information see vignette). |
k |
Numeric. Number of senators |
... |
Other arguments to pass to importFromSE if _x_ is SummarizedExperiment-class. |
Calculates a series of senators representing a large set of trajectories that would otherwise be computationally very expensive. For it, by means of the clara function of the cluster package a clustering is made obtaining the centroids as senators. These centroids can then be clustered based on the slope distance or Frechet or both. Finally, the data set will be assigned to the same cluster your senator is assigned to.
List with three slots:
Dataframe with original data.
Matrix with senator trajectories.
Vector with senator clusters.
Fernando Pérez-Sanz (fernando.perez8@um.es)
Miriam Riquelme-Pérez (miriam.riquelmep@gmail.com)
plotClusterSenator, imputeSenatorToData,
importFromSE.
1 2 3 4 5 6 7 | data( tscR )
data <- tscR
time <- c( 1, 2, 3 )
senators <- imputeSenators( data, k = 100 )
senatorDist <- slopeDist( senators$senatorData, time )
sClust <- getClusters( senatorDist, k = 5 )
plotCluster( senators$senatorData, sClust, 2 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.