-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
ENH fast path for binary confusion matrix #15403
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
Changes from all commits
81d6775
5819228
fd90156
0e55564
93f94e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -936,12 +936,6 @@ def test_confusion_matrix_dtype(): | |
assert cm[0, 0] == 4294967295 | ||
assert cm[1, 1] == 8589934590 | ||
|
||
# np.iinfo(np.int64).max should cause an overflow | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There might be a neater solution than removing this, but it turns out that different implementations will give different results in the case of overflow There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should it just test for the binary type and exact selection conditions as in the optimized code before making the assertions to exclude them? |
||
weight = np.full(len(y), 9223372036854775807, dtype=np.int64) | ||
cm = confusion_matrix(y, y, sample_weight=weight) | ||
assert cm[0, 0] == 9223372036854775807 | ||
assert cm[1, 1] == -2 | ||
|
||
|
||
def test_classification_report_multiclass(): | ||
# Test performance report | ||
|
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.