contingency_table_clusters: Contingency Table for Clusterings
Description
Compute the contingency table for a predicted clustering
given a ground truth clustering.
Usage
contingency_table_clusters(true, pred)
Value
Returns a table \(C\) (stored as a sparse matrix) such that
\(C_{ij}\) counts the number of elements assigned to
cluster \(i\) in pred and cluster \(j\) in true.
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.
See Also
eval_report_clusters computes common evaluation measures derived
from the output of this function.