Learn R Programming

longitudinalData (version 2.0)

plotCriterion: ~ Function: plotCriterion ~

Description

This function graphically displays the quality criterion of all the Partition of a ListPartition object.

Usage

plotCriterion(x, criterion=x["criterionActif"],nbCriterion=100,standardized = FALSE)

Arguments

x
[ClusterLongData]: object whose quality criterion should be displayed.
criterion
[character]: name of the criterion(s) to plot. It can either display all the value for a single specific criterion or display several criterion, only the best value for each clusters number and for each criterion.
nbCriterion
[numeric]: if there is a big number of Partition, the graphical display of all of them can be slow. nbCriterion lets the user limit the number of criteria that will be taken in account.
standardized
[logical]: some criterion should be maximized (like Calinski & Harabatz), some other should be minimized (like Davies & Bouldin). Some take big value, some small value, some n�gatives values. If standardized=TRUE, all the

Value

  • No value are return. A graph is printed.

Details

This function display graphically the quality criterion (probably to decide the best clusters' number). It can either display all the criterion ; this is useful to see the consistency of the result : is the best clusterization obtain several time or only one ? It can also display only the best result for each clusters number : this helps to find the local maximum, which is classically used to chose the "correct" clusters' number.

Examples

Run this code
###############
### Data g�n�ration

data <- gald(30)["traj"]

### Some clustering
listPart <- listPartition()
listPart["add"] <- partition(rep(c("A","B","A"),time=40),data)
listPart["add"] <- partition(rep(c("A","B","B"),time=40),data)
listPart["add"] <- partition(rep(c("A","B","C"),time=40),data)
listPart["add"] <- partition(rep(c("A","B","C","B","C"),time=24),data)
listPart["add"] <- partition(rep(c("A","B","A","C","D"),time=24),data)
ordered(listPart)

################
### graphical display
plotCriterion(listPart)
plotCriterion(listPart,criterion=CRITERION_NAMES)

Run the code above in your browser using DataLab