Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MRG] issue #13383: Made plot_compare_reduction.py faster #14350

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

Closed
wants to merge 2 commits into from
Closed

[MRG] issue #13383: Made plot_compare_reduction.py faster #14350

wants to merge 2 commits into from

Conversation

abhishek-jana
Copy link
Contributor

Addressed in #13383
Changed cv in line 66 and line 116 to 3. It was 5 before. It reduced CPU time in my computer from 32.5 sec to 18 sec.
Using previously defined cv = 5

              precision    recall  f1-score   support
       0          1.00         0.99         0.99        178
       1          0.83         0.84         0.83        182
       2          0.98         0.98         0.98        177
       3          0.80         0.82         0.81        183
       4          0.96         0.93         0.95        181
       5          0.90         0.97         0.93        182
       6          0.98         0.98         0.98        181
       7          0.87         0.97         0.92        179
       8          0.83         0.77         0.80        174
       9          0.79         0.69         0.74        180
   accuracy                                  0.89       1797
macro avg   0.89         0.89         0.89       1797

weighted avg 0.89 0.89 0.89 1797
CPU times: user 32.5 s, sys: 553 ms, total: 33 s
Wall time: 5.89 s

image

Using cv = 3

               precision    recall  f1-score   support

              0       1.00      0.99      0.99       178
              1       0.83      0.84      0.83       182
              2       0.98      0.98      0.98       177
              3       0.80      0.82      0.81       183
              4       0.96      0.93      0.95       181
              5       0.90      0.97      0.93       182
              6       0.98      0.98      0.98       181
              7       0.87      0.97      0.92       179
              8       0.83      0.77      0.80       174
              9       0.79      0.69      0.74       180
   accuracy                                0.89      1797
macro avg       0.89      0.89      0.89      1797

weighted avg 0.89 0.89 0.89 1797

CPU times: user 18 s, sys: 227 ms, total: 18.3 s
Wall time: 3.19 s

image

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @abhishek-jana!

Rendered before and after.

@qinhanmin2014
Copy link
Member

apologies the log in the issue seems outdated
in master, the example only takes 8 sec, this is also the case on my PC.

@amueller
Copy link
Member

No harm in speeding it up, though?

@qinhanmin2014
Copy link
Member

No harm in speeding it up, though?

cv=5 -> cv=3 (not recommended now), 8s -> 5s (trivial improvement IMO). This is why I close this @amueller .
But if you like it, please reopen and merge.

@amueller
Copy link
Member

You're right, it might be more important to show best practices for cv.

@abhishek-jana abhishek-jana deleted the my-feature branch July 14, 2019 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants