Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

concordance

Compute Concordance Matrix


Description

concordance calculates the concordance matrix between two partitions of the same data.

Usage

concordance(part1, part2)

Arguments

part1

[vector] : the first partition vector.

part2

[vector] : the second partition vector.

Details

Given two partitions, the function concordance calculates the number of pairs classified as belonging or not belonging to the same cluster with respect to partitions part1 or part2.

Value

A 2x2 matrix of the form :

|  P1   |  P2   |
  ____________________
   P1 |  Nyy  |  Nyn  |
   P2 |  Nny  |  Nnn  |
  ____________________

where

  • Nyy is the number of points belonging to the same cluster both in part1 and part2

  • Nyn is the number of points belonging to the same cluster in part1 but not in part2

  • Nny is the number of points belonging to the same cluster in part2 but not in part1

  • Nnn is the number of points not belonging to the same cluster both in part1 and part2

Author

Bernard Desgraupes
bernard.desgraupes@u-paris10.fr
University of Paris Ouest - Nanterre
Lab Modal'X (EA 3454)

See Also

Examples

# Generate two artificial partitions
part1<-sample(1:3,150,replace=TRUE)
part2<-sample(1:5,150,replace=TRUE)

# Compute the table of concordances and discordances
concordance(part1,part2)

clusterCrit

Clustering Indices

v1.2.8
GPL (>= 2)
Authors
Bernard Desgraupes (University of Paris Ouest - Lab Modal'X)
Initial release
2018-07-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.