TST Replace Boston dataset in test_plot_partial_dependence#17144
Merged
glemaitre merged 3 commits intoscikit-learn:masterfrom May 20, 2020
Merged
TST Replace Boston dataset in test_plot_partial_dependence#17144glemaitre merged 3 commits intoscikit-learn:masterfrom
glemaitre merged 3 commits intoscikit-learn:masterfrom
Conversation
thomasjpfan
reviewed
May 8, 2020
| def diabetes(): | ||
| diabetes = load_diabetes() | ||
| # Match type of `feature_names` of prev used `load_boston` | ||
| diabetes.feature_names = np.asarray(diabetes.feature_names) |
Member
There was a problem hiding this comment.
Is there somewhere in this file that requires this to be a ndarray?
Member
Author
There was a problem hiding this comment.
I decided to change the type of feature_names instead of changing the test, but I can change the test instead:
- test_plot_partial_dependence_str_features cycles through various
feature_namestypes. Can replace list with array here in the parameterization.
Also test_plot_partial_dependence_custom_axes specifically converts feature_names to a list but I didn't understand what it is testing/why this would make a difference. Thus I didn't want to change the original type of feature_names in case it makes a difference that I don't understand (if that makes sense).
Member
Author
|
thanks @thomasjpfan! |
Member
Author
|
ping @glemaitre |
Member
|
Thanks @lucyleeow |
viclafargue
pushed a commit
to viclafargue/scikit-learn
that referenced
this pull request
Jun 26, 2020
…arn#17144) Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
jayzed82
pushed a commit
to jayzed82/scikit-learn
that referenced
this pull request
Oct 22, 2020
…arn#17144) Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
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.
Reference Issues/PRs
Towards #16155
What does this implement/fix? Explain your changes.
Replaces Boston dataset with diabetes dataset in
test_plot_partial_dependence.py.Any other comments?
Col 1 of diabetes is not quantitative (sex), thus used columns 0 & 2 instead of 0 & 1.
feature_namesof Boston is of typenumpy.ndarraywhile for diabetes it is alist. Amended diabetesfeature_namesto type numpy array (in this test) instead of changing the original tests.