-
-
Notifications
You must be signed in to change notification settings - Fork 381
[GSK-1275] Importance of metrics calculated on partial data slice #1169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
GSK-1275 Importance of metrics calculated on partial data slice
User KD_A on reddit pointed out that
This is right. We may have 1000 samples in our data slice, but to calculate for example the recall we only use the positive samples, which may be just a few samples out of the total, making the detection a false positive. |
240413c to
a5bf2d4
Compare
…GSK-1279] - [GSK-1275] Fixes problems with metrics calculated on small samples - [GSK-1279] Experimental support for false discovery rate control via Benjamini–Hochberg procedure
874fd77 to
11a84a5
Compare
andreybavt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also LGTM with some questions
python-client/giskard/scanner/performance/performance_bias_detector.py
Outdated
Show resolved
Hide resolved
| def _calculate_affected_samples(self, y_true: np.ndarray, y_pred: np.ndarray, model: BaseModel) -> int: | ||
| if model.is_binary_classification: | ||
| # F1 score will not be affected by true negatives | ||
| neg = model.meta.classification_labels[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we only do it for binary classification and not for all cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the way the F1 is computed for multiclass is different. In our case it will use the total count of true positives, false positives, and false negatives in a one-vs-rest way for each class. So in the end it will use all the samples.
… into task/fix-scan-metrics
|
Kudos, SonarCloud Quality Gate passed! |








Fixes #1159.