File size: 490 Bytes
7c48757
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from typing import Any

import matplotlib.pyplot as plt


def plot_confusion_matrix(tp: int, fp: int, tn: int, fn: int):
    matrix = [[tp, fp], [fn, tn]]
    plt.imshow(matrix, cmap="Blues")
    plt.title("Confusion Matrix")
    plt.xlabel("Predicted")
    plt.ylabel("Actual")
    plt.colorbar()
    plt.show()

def display_illogics(sample: Any):
    # Placeholder: print or visualize detected illogics
    print("Illogics found:", getattr(sample, "illogics_found", []))