Rand and Adjusted Rand Index Calculator for Cluster Analysis

バージョン 1.0.0 (303 KB) 作成者: qqffssxx
An efficient MATLAB function for computing the Rand Index (RI) and Adjusted Rand Index (ARI),
ダウンロード: 153
更新 2023/6/9

ライセンスの表示

This function, named randindex, allows users to calculate two crucial statistical measures, the Rand Index (RI) and the Adjusted Rand Index (ARI), which are commonly used for comparing the similarity between two data clusterings. The function is compatible with any numerical labels used for clustering and returns both the RI and ARI values for easy performance comparison and clustering evaluation.
In clustering tasks, measuring the quality and the reliability of the results is essential. The Rand Index (RI) measures the percentage of decisions that are consistent between two clusterings, while the Adjusted Rand Index (ARI) corrects the RI by the chance grouping of elements, providing a more robust statistic for comparing different clustering algorithms or methods.
Usage is straightforward. Simply provide two same-length vectors of labels, representing two different clustering results, and the function will return the corresponding RI and ARI values.
The function was thoroughly tested against Python's sklearn library metrics, ensuring its accuracy and reliability.
Example usage:
labels1 = [1 1 2 3 2 1 1 3 2 2];
labels2 = [2 2 3 1 3 2 2 1 3 3];
[RI, ARI] = randindex(labels1, labels2);
disp(['RI: ', num2str(RI)]);
disp(['ARI: ', num2str(ARI)]);
We hope you find this function useful in your data analysis tasks.

引用

qqffssxx (2024). Rand and Adjusted Rand Index Calculator for Cluster Analysis (https://www.mathworks.com/matlabcentral/fileexchange/130779-rand-and-adjusted-rand-index-calculator-for-cluster-analysis), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2018a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
謝辞

ヒントを得たファイル: Adjusted Rand Index

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0