Skip to content
EvalSuite
Documentation menu

Classification

Confusion matrix

Implementedclassification.confusion_matrix

Definition

Counts of true versus predicted labels. Computed once per evaluation and shared by every count-based metric.

Formula

Cᵢⱼ = #{n : yₙ = i and ŷₙ = j}

Range: non-negative counts

Inputs and outputs

  • y_true: array of class labels
  • y_pred: array of predicted labels

Returns: K×K integer array

Assumptions

No assumptions beyond valid, aligned inputs of the documented types.

Limitations

No metric-specific limitations are documented yet. Interpret the value alongside the task, data, and other metrics.

Python API

PythonSince v0.1.0
import evalsuite as es

es.confusion_matrix(y_true, y_pred, normalize="true")

References

Primary references for this entry have not been added yet.

Implementation status