cc_test_ari_permutation: A permutation test for testing the null hypothesis of random...

View source: R/cc_test_ari_permutation.R

cc_test_ari_permutationR Documentation

A permutation test for testing the null hypothesis of random agreement (i.e., adjusted Rand Index equal to 0) between two partitions.

Description

A permutation test for testing the null hypothesis of random agreement (i.e., adjusted Rand Index equal to 0) between two partitions.

Usage

cc_test_ari_permutation(ground_truth, partition)

Arguments

ground_truth

(int) A vector of the actual membership of elements in clusters

partition

The partition coming from a clustering algorithm

Value

A data_frame with two columns:

ari

the adjusted Rand Index

p_value

the p-value of the test

Author(s)

Paola Tellaroli, <paola dot tellaroli at unipd dot it>; Livio Finos, <livio dot finos at unipd dot it>

References

Samuh M. H., Leisch F., and Finos L. (2014), Tests for Random Agreement in Cluster Analysis, Statistica Applicata-Italian Journal of Applied Statistics, vol. 26, no. 3, pp. 219-234.

L. Hubert and P. Arabie (1985) Comparing partitions, Journal of Classification, 2, 193-218.

Examples

library(CrossClustering)

clusters <- iris[-5] |>
  dist() |>
  hclust(method = 'ward.D') |>
  cutree(k = 3)

ground_truth <- iris[[5]] |>
  as.numeric()

cc_test_ari_permutation(ground_truth, clusters)


CrossClustering documentation built on May 29, 2024, 9:22 a.m.