Learn R Programming

kml (version 2.1.2)

clusterization: ~ Function: clusterization ~

Description

clusterization is the constructor of the class Clusterization.

Usage

clusterization(xPartition, yLongData, convergenceTime = 0, criterionName = "calinski", criterionValue = numeric(), imputationMethod = "", startingCondition = "", algorithmUsed = "")

Arguments

xPartition
[Partition]: object that will be turn into a Clusterization
yLongData
[LongData]: longitudinal data on which the clusterization has been run.
convergenceTime
[numeric]: if the clusterization has been obtain through an algorithm, number of steps of this algorithm before convergence.
criterionName
[character]: criterion use to evaluate the quality of the partitionnig.
criterionValue
[numeric]: value of the criterion use to evaluate the quality of the partitionning.
imputationMethod
[character]: name off the methods used to impute missing values. See imputation.
startingCondition
[character]: name off the methods used to define starting condition. See partitionInitialise.
algorithmUsed
[character]: algormith use to obtain the partition. Only k-means is available at this time.

Value

  • Object of class Clusterization.

Details

In KmL, strickly speaking, a Partition is just a sequence of letters (independant of any trajectories) ; a Clusterization is a Partition associate with a set of trajectories. So a Clusterizationis a Partition with some additionnal information like some quality criterion, the name and convergence time off the algorithm use to clusterize the population...

Examples

Run this code
### Creation of a partition
part <- partition(rep(c(1,2),4),2)

### Some trajectories
traj1 <- gald(nbEachClusters=2)

### Tranformation of part into a Clusterization
clusterization(part,traj1)
# Calinski criterion is arround 0.50...



### Some other trajectories
traj2 <- gald(nbEachClusters=4, functionClusters=list(function(t){5-t},function(t){5+t}))

### Tranformation of part into a Clusterization
clusterization(part,traj2)
# Calinski criterion is arround 0.15...

# part is probably a good partition for traj1, but not for traj2...

Run the code above in your browser using DataLab