From cee232c00dad281387ff5bffb2b601ddb211d770 Mon Sep 17 00:00:00 2001 From: JohnGF <57330015+JohnGF@users.noreply.github.com> Date: Wed, 25 Sep 2024 11:32:53 +0100 Subject: [PATCH] Update pretty_confusion_matrix.py Update to enable kwargs in heatmap function. Example Normalize. I mostly had to do this change for a project of mine. I dont know your commit to main guide. Anything, feel free to just let me know. Cheers --- pretty_confusion_matrix/pretty_confusion_matrix.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pretty_confusion_matrix/pretty_confusion_matrix.py b/pretty_confusion_matrix/pretty_confusion_matrix.py index 566a781..90a0a21 100644 --- a/pretty_confusion_matrix/pretty_confusion_matrix.py +++ b/pretty_confusion_matrix/pretty_confusion_matrix.py @@ -154,6 +154,7 @@ def pp_matrix( pred_val_axis="y", path_to_save_img="", title="Confusion matrix", + **kwargs ): """ print conf matrix with default layout (like matlab) @@ -183,6 +184,7 @@ def pp_matrix( ax = sn.heatmap( df_cm, + **kwargs, annot=annot, annot_kws={"size": fz}, linewidths=lw, @@ -191,6 +193,7 @@ def pp_matrix( cmap=cmap, linecolor="w", fmt=fmt, + ) # set ticklabels rotation