Skip to content

Latest commit

 

History

History
94 lines (77 loc) · 1.42 KB

confusion_matrix.md

File metadata and controls

94 lines (77 loc) · 1.42 KB

TFSimilarity.visualization.confusion_matrix

Plot confusion matrix

TFSimilarity.visualization.confusion_matrix(
    normalize: bool = True,
    title: str = Confusion matrix,
    cmap: str = Blues,
    show: bool = True

Args

y_pred Model prediction returned by model.match()
y_true Expected class_id.
normalize Normalizes matrix values between 0 and 1. Defaults to True.
labels List of class string label to display instead of the class numerical ids. Defaults to None.
title Title of the confusion matrix. Defaults to 'Confusion matrix'.
cmap Color schema as CMAP. Defaults to 'Blues'.
show If the plot is going to be shown or not. Defaults to True.

Returns

A Tuple containing the plot and confusion matrix.