conditionalClassEntropy: classEntropyGivenClusters

View source: R/external_cluster_validity.R

conditionalClassEntropyR Documentation

classEntropyGivenClusters

Description

Computes the conditional entropy of a set of classes, given the cluster assignments, as defined in https://aclweb.org/anthology/D/D07/D07-1043.pdf

Usage

conditionalClassEntropy(contingency, c, k)

Arguments

contingency

Table, contingency table between clusters and conditions as returned by the table function

c

Vector of classes

k

Vector of clusters

Value

Numeric

Examples


clusters <- c(0, 0, 2, 1, 1, 0, 1)
classes <- c("A", "A", "A", "B", "B", "A", "B")
ct <- table(classes, clusters)
conditionalClassEntropy(contingency = ct)


selinj/chromswitch documentation built on Jan. 27, 2024, 12:36 p.m.