| ordered(ListPartition) | R Documentation |
Sort the Partition of a
ListPartition according to a quality criterion.
ordered(x,...)
x |
[ListPartition]: Object whose |
... |
Note used, for S4 compatibility only. |
Sort the Partition of a ListPartition for each
list (sort the 'c2' list, the 'c3' list,...) according to a quality criterion.
The criterion used to sort is the one in the field
criterionActif.
This function change internaly the order of the fields c2,
c3, ... c26 of an object. In addition, it return the
permutation matrix (the matrix use to re-ordered the ci).
Christophe Genolini
1. UMR U1027, INSERM, Université Paul Sabatier / Toulouse III / France
2. CeRSME, EA 2931, UFR STAPS, Université de Paris Ouest-Nanterre-La Défense / Nanterre / France
[1] Christophe M. Genolini and Bruno Falissard
"KmL: k-means for longitudinal data"
Computational Statistics, vol 25(2), pp 317-328, 2010
[2] Christophe M. Genolini and Bruno Falissard
"KmL: A package to cluster longitudinal data"
Computer Methods and Programs in Biomedicine, 104, pp e112-121, 2011
##############
### Preparing data
data(artificialLongData)
traj <- as.matrix(artificialLongData[,-1])
### Some clustering
part2 <- partition(rep(c("A","B"),time=100),traj)
part3 <- partition(rep(c("A","B","C","A"),time=50),traj)
part3b <- partition(rep(c("A","B","C","B"),time=50),traj)
part4 <- partition(rep(c("A","B","C","D"),time=50),traj)
################
### ListPartition
listPart <- listPartition()
listPart['criterionActif'] <-"Davies.Bouldin"
plotCriterion(listPart)
listPart["add"] <- part2
listPart["add"] <- part3
listPart["add"] <- part3b
listPart["add"] <- part4
listPart["add"] <- part4
listPart["add"] <- part3
listPart["add"] <- part3b
plotCriterion(listPart)
ordered(listPart)
plotCriterion(listPart)
listPart['criterionActif'] <-"Calinski.Harabatz"
plotCriterion(listPart)
ordered(listPart)
plotCriterion(listPart)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.