imputeSenators {tscR} | R Documentation |
Compute clustering with clara function to obtain a number of 'senators'
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.
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 )