imputeSenatorToData {tscR} | R Documentation |
Assign trajetories from the original data to senator clusters.
imputeSenatorToData(senators, clusters)
senators |
List object obtained from imputeSenator function |
clusters |
Pam object obtained from getClusters or combineCluster. |
When it's computed a clustering over senators, it's necessary to assign those cluster to original data. To do this, it's known which senator each original trajectory belong to, therefore the final cluster of each senator is identified and the trajectories of that senator are assigned to its definitive cluster.
Object of imputeSenator-class.
Fernando Pérez-Sanz (fernando.perez8@um.es)
Miriam Riquelme-Pérez (miriam.riquelmep@gmail.com)
plotClusterSenator, imputeSenators,
getClusters, imputeSenator-class.
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 ) endCluster <- imputeSenatorToData( senators, sClust )