Last chance! 50% off unlimited learning
Sale ends in
partition
is the constructor of the class
Partition
. It can be build either alone or
relatively to a object LongData
.
partition(clusters, traj, details=character())
An object of class Partition
.
[vector(factor)]
: cluters to which each
individual belongs. Each clusters is represented by an upper letters.
[matrix]
or [array]
: if an object LongData
is
provide, it will be used to compute the quality criterion of the
clustering. array
are simply turn into matrix by "sticking"
all the variables one behind the other.
[vector(character)]
: the slot details
is
used to store various informations. If the Partition
has been
find using an algorithm, it can store the name of the algorithm, the
time before convergence, the number of iteration and any other
informations. The syntaxe is details=c(algoritm="kmeans",convergenceTime="6",otherInfo="WhateverIWant")
.
Christophe Genolini
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
partition
construct a object of class
Partition
. It does not provide any default
values. yLongData
and details
are optional.
[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
Partition,ordered
### Empty partition
partition()
### Small partition
partition(clusters=c("A","B","A","C","C"))
### Random partition
partition(clusters=LETTERS[floor(runif(100,1,5))])
### Partition that clusters correctly some data
### Quality criterion are high
data(artificialLongData)
traj <- as.matrix(artificialLongData[,-1])
partition(clusters=rep(1:4,each=50),traj)
### Partition that does not cluster correctly the data
### Quality criterion are low
partition(clusters=rep(1:4,50),traj)
Run the code above in your browser using DataLab