This program build a consensus partition from a set of m partitions of a set of n elements X. The data file can be either m partitions of X (all the elements must be clustered), or an array (n x m) of m nominal variables, row indexed on X, each column being a partition.

The X elements are labelled by strings having no more than 20 characters.

The weight of a pair of elements is the number of partitions joining this pair, minus the consensus threshold. The score of a class is the sum of weights of joined pairs. The sum of the class scores is the score of the partition. We try to optimize this score function over the set of all the partitions of X.

Usually the consensus threshold is half the number of partitions (m/2). To make appear non empty classes, this threshold can be weaken.

This program first indicates the best partition of the profile and its score. Then it computes two partitions corresponding to two heuristics :

- the Fusion-Transfer method and
- the partitions optimized by transfers from the connected components of the Graphe de Regnier.

For each partition, classes are edited, followed by the class score and its robustness. This latter is the average percentage of partitions in the profile, joining the element pairs of the class.

If all the connected components of the Graphe de Regnier have no more than 12 elements, the optimal partition can be determined by enumeration. In that case, the optimal score is given.

ConsPart.pdf

A. Guénoche (2010) *Consensus of partitions : a constructive approach*, submitted

The data file must be in a folder named Data placed in the same folder as the program.

Its format can be :

- A series of partitions as here : There are 5 partitions of 10 items ; in the first one there are 4 classes having respectively 2, 5, 2 et 1 items. The second one has 2 classes with 5 items etc.
- The data file can be a table of nominal variables in which each partition is a column in which classes can be numbered anyway : for the same partitions as above, we get :
10 5

x1 1 1 3 1 1

x2 2 1 4 2 2

x3 2 2 1 3 3

x4 2 2 3 2 2

x5 2 2 1 1 4

x6 1 1 3 1 4

x7 2 2 3 2 1

x8 3 1 4 1 3

x9 3 1 4 1 4

x10 4 2 2 2 1

5 10

4

2 x1 x6

5 x2 x3 x4 x5 x7

2 x8 x9

1 x10
2

5 x1 x2 x6 x8 x9

5 x3 x4 x5 x7 x10

4

2 x3 x5

1 x10

4 x1 x4 x6 x7

3 x2 x9 x8
3

5 x1 x5 x6 x8 x9

4 x2 x4 x7 x10

1 x3

4

3 x1 x7 x10

2 x2 x4

2 x3 x8

3 x5 x6 x9