ConsensusPartition: Consensus of Partitions

Description Usage Arguments Details Value References Examples

View source: R/ConsensusPartition.R

Description

Returns the consensus partition among a set of partitions

Usage

1
2
ConsensusPartition(Part, ngroups = 0, type = "cutree", optim = FALSE, 
            maxiter = 100, plotDendrogram = FALSE, verbose = FALSE)

Arguments

Part

Object of class SortingPartition

ngroups

Number of groups of the consensus (or ngroups=0 for optimal choice)

type

Method (type="cutree" or type="fusion" or type="medoid")

optim

Optimisation of the consensus (default is optim=FALSE)

maxiter

Maximum number of iterations for fusion algorithm

plotDendrogram

Plot of the dendrogram (if type="cutree" initialisation)

verbose

Print the initialisation results

Details

The criterion for optimal consensus is the mean adjusted Rand Index between the consensus and the partitions given by the subjects.

If ngroups=0, consensus is computed between 2 and nstimuli-1 and the best consensus is returned.

For type="cutree", the initialisation step is based on cutting the tree generated by clustering the stimuli. For type="fusion", the initialisation step is based on the fusion algorithm. In this case, results are more accurate but the algorithm might be time consuming. For type="medoid", the consensus is the closest partition to all the partitions given by subjects.

For optim=TRUE, a transfer step is performed after the initialisation step.

Value

List of following components:

Consensus

Consensus

Crit

Criterion for consensus

References

Krieger & Green (1999) J. of Classification, 16:63-89

Examples

1
2
3
4
5
6
7
8
9
  data(AromaSort)
  Aroma<-SortingPartition(AromaSort)
  res<-ConsensusPartition(Aroma,ngroups=0,type="cutree")
  res
  ##res<-ConsensusPartition(Aroma,ngroups=0,type="fusion",optim=TRUE)
  ##res
  ##res<-ConsensusPartition(Aroma,type="medoid")
  ##res
  

Example output

Loading required package: smacof
Loading required package: plotrix
Loading required package: colorspace
Loading required package: e1071

Attaching package:smacofThe following object is masked frompackage:base:

    transform

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-7
Loading required package: ellipse

Attaching package:ellipseThe following object is masked frompackage:graphics:

    pairs

$Consensus
          Lemon      Grapefruit       Pineapple            Pear           Honey 
              1               1               1               1               2 
         Butter    Grilledbread Grilledhazelnut      Strawberry       Raspberry 
              3               4               4               1               1 
         Cherry    Blackcurrant     Greenpepper          Smoked          Pepper 
              5               3               2               2               5 
       Licorice 
              2 

$Crit
[1] 0.2819987

FreeSortR documentation built on May 2, 2019, 2:47 p.m.