-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
MNT Speed up of plot_face_recognition.py example #21725
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
Merged
glemaitre
merged 11 commits into
scikit-learn:main
from
pramodatre:speed_up_plot_face_recognition.py
Dec 15, 2021
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d87c933
Speed up of plot_face_recognition.py by leveraging all cores when run…
pramodatre 01b9476
Merge branch 'scikit-learn:main' into speed_up_plot_face_recognition.py
pramodatre a606449
Replaced GridSearchCV with RandomizedSearchCV with 3x improvement in …
pramodatre 96cb63a
Noticed that black formatter check failed on CI. So, formatted the sc…
pramodatre 939b15c
Removed expected performace results in the comments to avoid confusio…
pramodatre a3a5647
Fixing linting issue which was failing on CI using black formatter
pramodatre 88f9539
Addressed comments to include StandardScaler(), using ConfusionMatrix…
pramodatre 9a80116
flake8 check and ran black formatter
pramodatre b45a004
Addressing review comments: Added labels to the confusion matrix disp…
pramodatre dd6f058
Added a note at the end of the notebook as suggested to indicate neur…
pramodatre 1e7d3bf
Fixed issue of x-lables overflowing from the confusion matrix plot
pramodatre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
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.
Alternatively trying
RandomizedSearchCV
withn_iter=10
should work well here and be faster than an exhaustive grid search of the 5x5 combinations.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.
In addition, I think that it could be good to add a
StandardScaler
before applying thePCA
.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.
The
RandomizedSearch
looks like a good idea using theloguniform
to sampleC
andgamma
.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.
Thanks for this idea! Yeah, totally makes sense! I will try this option and report performance differences I register.