~ Function: ordered(ListPartition) ~

Description

Sort the Partition of a ListPartition according to a quality criterion.

Usage

1

Arguments

x

[ListPartition]: Object whose Partition should be sort.

...

Note used, for S4 compatibility only.

Details

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.

Value

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).

Author

Christophe Genolini
1. UMR U1027, INSERM, Universit<e9> Paul Sabatier / Toulouse III / France
2. CeRSME, EA 2931, UFR STAPS, Universit<e9> de Paris Ouest-Nanterre-La D<e9>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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
##############
### 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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.