mutual_info: Mutual Information Between Clusterings

View source: R/measures_clusterings.R

mutual_infoR Documentation

Mutual Information Between Clusterings

Description

Computes the mutual information between two clusterings, such as a predicted and ground truth clustering.

Usage

mutual_info(true, pred, base = exp(1))

Arguments

true

ground truth clustering represented as a membership vector. Each entry corresponds to an element and the value identifies the assigned cluster. The specific values of the cluster identifiers are arbitrary.

pred

predicted clustering represented as a membership vector.

base

base of the logarithm. Defaults to exp(1).

Details

Mutual information is an entropy-based measure of the similarity between two clusterings.

Examples

true <- c(1,1,1,2,2)  # ground truth clustering
pred <- c(1,1,2,2,2)  # predicted clustering
mutual_info(true, pred)


clevr documentation built on Sept. 16, 2023, 5:06 p.m.