kml {kml} | R Documentation |
KmL
is a non parametric algorithm for clustering longitudinal
data. Here is the description of the algorithm. For an overview of the package,
see kml-package.
kml(.Object, nbClusters = 2:6, nbRedrawing = 20, maxIt = 200, print = "calinski", distance = "euclidean")
.Object |
[ClusterizLongData]: contains trajectories to clusterize as well as pre-existing clusterizations. |
nbClusters |
[numeric] Vector containing the number of clusters
with which KmL must work. By default,
nbClusters is 2:6 which indicates that KmL must
search partitions with respectively 2, then 3, ... up to 6
clusters. Maximum number of cluster is 10. |
nbRedrawing |
[numeric] Sets the number of retire to execute for each number of clusters. |
maxIt |
[numeric]: sets a limit to the number of iteration before convergeance. |
print |
[character]: can take on two values : "all"
forces the display of the algorithme under progression. Any other value suppresses this display (faster). |
distance |
[character] method used to measures the distance between trajectories (only "euclidean" is avalable for now). |
kml
works on object of class ClusterizLongData
.
For each number included in nbClusters
, kml
looks for a
clusterization then stores it in the field clusterizList
according to its number of clusters. The algorithm starts over as many times as it is told in nbRedrawing
. By default, it is executed for 2,
3, 4, 5 and 6 clusters 20 times each, namely 100 times.
When a clusterization has been found, it is added to the slot
clusterizList
. clusterizList
stores all the partitions
found according to their number of clusters. The
Clusterization
with the same number of clusters are sort from the biggest Calinski criterion to
the smallest. So the best are stored first.
Clusterization
are saved throughout. If the user wish to
interrupt the execution of kml
, the result will not be lost.
A class ClusterizLongData
object, after having added supplementary Clusterization
.
Christophe Genolini
PSIGIAM: Paris Sud Innovation Group in Adolescent Mental Health
INSERM U669 / Maison de Solenn / Paris
Responsable : <genolini@u-paris10.fr>
Raphaël Ricaud
Laboratoire "Sport & Culture" / "Sports & Culture" Laboratory
University of Paris 10 / Nanterre
### Generation of some data cld1 <- as.cld(generateArtificialLongData()) ### We suspect 2, 3 4 or 5 clusters, we want 3 redrawing. # And we want to "see" what happen (so print="all") #kml(cld1,2:6,3,print="all") ### 3 seems to be the best. But to be sure, we try more redrawing 3 or 6 only. # We don't want to see again, we want to get the result as fast as possible. #kml(cld1,c(3,6),10)