imputeSenators: Preclustering function for large data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/imputeSenators.R

Description

Compute clustering with clara function to obtain a number of 'senators'

Usage

1
imputeSenators(x, k = 100, ...)

Arguments

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.

Details

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.

Value

List with three slots:

data

Dataframe with original data.

senatorData

Matrix with senator trajectories.

senatorCluster

Vector with senator clusters.

Author(s)

Fernando Pérez-Sanz (fernando.perez8@um.es)

Miriam Riquelme-Pérez (miriam.riquelmep@gmail.com)

See Also

plotClusterSenator, imputeSenatorToData, importFromSE.

Examples

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 )

fpsanz/tscR documentation built on July 17, 2020, 2:20 a.m.