ConfusionMatrixReport#
- class ConfusionMatrixReport[source]#
Calculate the confusion matrix of the model on the given dataset.
For object detection, each detected bounding box calculates the IoU for each label and then that label class is used for the confusion matrix. detected bounding boxes that don’t match a label has their own class and same for labels without detected bounding boxes.
- Parameters
- categories_to_display (int, default 10):
Maximum number of categories to display
- confidence_threshold (float, default 0.3):
Threshold to consider bounding box as detected.
- iou_threshold (float, default 0.5):
Threshold to consider detected bounding box as labeled bounding box.
- normalized (bool, default True):
boolean that determines whether to normalize the true values of the matrix.
- n_samplesOptional[int] , default10000
Number of samples to use for the check. If None, all samples will be used.
- __init__(categories_to_display: int = 10, confidence_threshold: float = 0.3, iou_threshold: float = 0.5, normalized: bool = True, n_samples: Optional[int] = 10000, **kwargs)[source]#
- __new__(*args, **kwargs)#
Methods
|
Add new condition function to the check. |
Remove all conditions from this check instance. |
|
|
Compute and plot confusion matrix after all batches were processed. |
Run conditions on given result. |
|
|
Return check configuration (conditions' configuration not yet supported). |
|
Return check object from a CheckConfig object. |
|
Deserialize check instance from JSON string. |
|
Initialize run by creating an empty matrix the size of the data. |
|
Return check metadata. |
Name of class in split camel case. |
|
|
Return parameters to show when printing the check. |
Remove given condition by index. |
|
|
Run check. |
|
Serialize check instance to JSON string. |
|
Add batch to confusion matrix. |
Update the confusion matrix by batch for classification task. |
|
Update the confusion matrix by batch for object detection task. |