confusion
ConfusionMatrixNovelty
Bases: ConfusionMatrix
Confusion Matrix for novelty detection in data streams.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
known_classes |
list of int
|
List of known labels, the labels the algorithm knows prior to the online phase |
required |
Attributes:
Name | Type | Description |
---|---|---|
novel_cm |
ConfusionMatrix
|
Binary confusion matrix representing the problem in a binary manner, including class 0 (known) and class 1 (novelty) |
nc_samples |
int
|
Number of samples representing a novelty |
fe |
int
|
Known samples that have been classified as a known class other than its ground truth |
Source code in streamndr/metrics/confusion.py
get_associated_classes()
Computes the associated known class to each novelty pattern discovered, as described in [1], by using the real class most represented in each novelty pattern. Ignores the unknown samples (label -1).
[1] E. R. Faria, I. J. C. R. Gonçalves, J. Gama and A. C. P. L. F. Carvalho, "Evaluation Methodology for Multiclass Novelty Detection Algorithms," 2013 Brazilian Conference on Intelligent Systems, Fortaleza, Brazil, 2013, pp. 19-25, doi: 10.1109/BRACIS.2013.12.
Returns:
Type | Description |
---|---|
ConfusionMatrixNovelty
|
The confusion matrix using the most represented known class for each of the novelty pattern reported |