| ListPartition-class {longitudinalData} | R Documentation |
~ Class: ListPartition ~
Description
An object of class ListPartition contain several liste of
Partition sorted by cluster numbers.
Objects from the Class
Objects are mainly design to store the numerous Partition found
by kml or kml3d.
Slots
criterionActif[character]: Store the criterion name that will be used by fonctions that need a single criterion (like plotCriterion or ordered).
initializationMethod[vector(chararcter)]: list all the initialization method that has allready been used to find some
Partition(usefull to not run several time a deterministic method).sorted[logical]: are thePartitioncurently hold in the object sorted in decreasing (or increasing, according tocriterionActif) order ?c1[list(Partition)]: list of
Partitionwith 1 clusters.c2[list(Partition)]: list of
Partitionwith 2 clusters.c3[list(Partition)]: list of
Partitionwith 3 clusters.c4[list(Partition)]: list of
Partitionwith 4 clusters.c5[list(Partition)]: list of
Partitionwith 5 clusters.c6[list(Partition)]: list of
Partitionwith 6 clusters.c7[list(Partition)]: list of
Partitionwith 7 clusters.c8[list(Partition)]: list of
Partitionwith 8 clusters.c9[list(Partition)]: list of
Partitionwith 9 clusters.c10[list(Partition)]: list of
Partitionwith 10 clusters.c11[list(Partition)]: list of
Partitionwith 11 clusters.c12[list(Partition)]: list of
Partitionwith 12 clusters.c13[list(Partition)]: list of
Partitionwith 13 clusters.c14[list(Partition)]: list of
Partitionwith 14 clusters.c15[list(Partition)]: list of
Partitionwith 15 clusters.c16[list(Partition)]: list of
Partitionwith 16 clusters.c17[list(Partition)]: list of
Partitionwith 17 clusters.c18[list(Partition)]: list of
Partitionwith 18 clusters.c19[list(Partition)]: list of
Partitionwith 19 clusters.c20[list(Partition)]: list of
Partitionwith 20 clusters.c21[list(Partition)]: list of
Partitionwith 21 clusters.c22[list(Partition)]: list of
Partitionwith 22 clusters.c23[list(Partition)]: list of
Partitionwith 23 clusters.c24[list(Partition)]: list of
Partitionwith 24 clusters.c25[list(Partition)]: list of
Partitionwith 25 clusters.c26[list(Partition)]: list of
Partitionwith 26 clusters.
Construction
Class ListPartition objects are mainly constructed by
kml.
Neverdeless, it is also possible to construct them from
scratch using the fonction listPartition that does
create an empty object.
Methods
object['xxx']If 'xxx' is 'cX', 'initializationMethod', 'sorted' or 'criterionActif', get the value of the field
xxx.object['criterionValues',j]Give the values of the criterion 'j' for all the Partitions. The result is return as a list. If 'j' is missing, the criterion actif is used.
object['criterionValuesAsMatrix',j]Give the values of the criterion 'j' for all the Partitions. The result is return as a matrix. If 'j' is missing, the criterion actif is used.
object['xxx']If 'xxx' is a criterion, this is equivalent to object['criterionValuesAsMatrix','xxx']
object['initializationMethod']<-valueSet the field to
valueobject['criterionActif']<-valueIf 'value' is one of CRITERION_NAMES, it sets the field to the criterion 'value'.
object['add']<-valueIf 'value' is an object of class 'Partition', then value is added to the Partition already hold in the field 'cX'. Note that a Partition with 'X' clusters is automatiquely added to the correct list 'cX' according to its number of clusters.
object['clear']<-'cX'Clear the list 'cX'.
listPartitionConstructor. Build an empty object.
orderedOrder the Partition according to the criterion actif.
regroupOrder then merge identical Partition (usefull to reduce the size of the
ListPartition)
Author
Christophe Genolini^{1,2}
1. UMR U1027, INSERM, Université Paul Sabatier / Toulouse III / France
2. CeRSM, EA 2931, UFR STAPS, Université de Paris Ouest-Nanterre-La Défense / Nanterre / France
References
[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
See Also
Classes: LongData
Methods: Partition
Examples
##############
### 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","C"),time=40),traj)
part4 <- partition(rep(c("A","B","A","C","D"),time=40),traj)
################
### ListPartition
listPart <- listPartition()
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)
regroup(listPart)
plotCriterion(listPart)
plotAllCriterion(listPart)