-
-
Notifications
You must be signed in to change notification settings - Fork 211
add new example regarding svm hyperparameter plotting #834
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
| output_format='dataframe', | ||
| parameters_in_separate_columns=True, | ||
| ) | ||
| hyperparameters = ['sklearn.svm.classes.SVC(16)_C', 'sklearn.svm.classes.SVC(16)_gamma'] |
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.
How about printing the column names here to show that sklearn.svm.classes.SVC(16)_C & sklearn.svm.classes.SVC(16)_gamma or a check whether it is in the colnames list with the in operator?
| df = openml.evaluations.list_evaluations_setups( | ||
| 'predictive_accuracy', flow=[8353], task=[6], | ||
| output_format='dataframe', parameters_in_separate_columns=True, | ||
| ) # Choose an SVM flow, for example 8353, and a task. |
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.
Could we have the parameters on separate lines to maintain parity with a similar call earlier in the script?
| plt.colorbar(cntr, label="accuracy") | ||
| plt.xlim((min(C), max(C))); plt.ylim((min(gamma), max(gamma))) | ||
| plt.xlabel("C (log10)"); plt.ylabel("gamma (log10)") |
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.
It may be good to have a brief title to the plot.
Also, shouldn't there be a plt.show() for it to come up on the rendered website, and also as a thumbnail on the Examples page?
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.
I'll add a title.
The other two are not necessary for the gallery.
| import openml | ||
| import numpy as np | ||
| import matplotlib.pyplot as plt |
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.
We could maybe avoid duplicate imports by having a one-time dependency loading at the beginning.
Codecov Report
@@ Coverage Diff @@
## develop #834 +/- ##
==========================================
Coverage ? 89.31%
==========================================
Files ? 36
Lines ? 4718
Branches ? 0
==========================================
Hits ? 4214
Misses ? 504
Partials ? 0Continue to review full report at Codecov.
|
No description provided.