Computing Kappa Index

Kappa index in a widely used statistic for evaluating the agreement of two clustering results.
1,5K Downloads
Aktualisiert 11. Jan 2009

Lizenz anzeigen

USAGE kappa=kappaindex(X,G,N)

X is a vector of length M (number of data samples). Each entry of X is associated with the cluster index for that sample

G is a vector in the same format of X belonging to ground truth indecies or a secondary clustering

N is the number of clusters

This measure only works when X and G have the same number of clusters. In addition, the set of indecies must be integers from one through the number of clusters.

However, they might be equivalent through a permutation of indecies

Example:
>> X=[1 1 2 2 3 3]; G=[2 2 1 1 3 3]; kappaindex(X,G,3)
ans = 1
>> X=[1 1 2 2 4 4 3]; G=[4 2 2 2 1 1 3]; kappaindex(X,G,4)
ans = 0.8056

Zitieren als

Hossein Mobahi (2025). Computing Kappa Index (https://de.mathworks.com/matlabcentral/fileexchange/22645-computing-kappa-index), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R2008b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Cluster Analysis and Anomaly Detection finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0