Skip to content

[source]

Contingency Table#

A Contingency Table is used to display the frequency distribution of class labels among a clustering. It is similar to a Confusion Matrix but uses the labels to establish ground-truth for a clustering problem instead.

Estimator Compatibility: Clusterer

Parameters#

This report does not have any parameters.

Example#

use Rubix\ML\CrossValidation\Reports\ContingencyTable;

$report = new ContingencyTable();

$result = $report->generate($predictions, $labels);

echo $result;
[
    {
        "lamb": 11,
        "wolf": 2
    },
    {
        "lamb": 1,
        "wolf": 5
    }
]