Refactor of metrics.roc_curve method#350
Merged
agramfort merged 6 commits intoscikit-learn:masterfrom Sep 14, 2011
tinyclues:master
Merged
Refactor of metrics.roc_curve method#350agramfort merged 6 commits intoscikit-learn:masterfrom tinyclues:master
agramfort merged 6 commits intoscikit-learn:masterfrom
tinyclues:master
Conversation
The new implementation, even if it looks very naive, reduces the
computation time of fpr/tpr vectors.
roc_curve computation time depends now only on the length of y_score.
For comparison, here are the results between the old and the new
implementation for the following vectors:
- 10^6 length vector (y_score has 1000 unique values):
- old impl.: 28.29 seconds
- new impl.: 3.14 seconds
- 10^6 length vector (y_score has 10000 unique values):
- old impl.: 267.61 seconds
- new impl.: 3.64 seconds
scikits/learn/metrics/metrics.py
Outdated
Member
|
Also please merge the upstream master into your branch as your as still using the old package names and this branch is not mergeable as it is. |
Member
|
ping @agramfort (this PR review is for you :) |
sklearn/metrics/metrics.py
Outdated
Member
There was a problem hiding this comment.
this "thresholds“ is not used later.
Contributor
Author
There was a problem hiding this comment.
ooops .... reminiscence of the old implementation :-/.
Fixed in 52cc103
Adds dtype on tpr/fpr array creation.
agramfort
added a commit
that referenced
this pull request
Sep 14, 2011
Refactor and speed up of metrics.roc_curve method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The new implementation, even if it looks very naive, reduces the
computation time of fpr/tpr vectors.
roc_curve computation time depends now only on the length of y_score.
For comparison, here are the results between the old and the new
implementation for the following vectors: