Skip to content

ENH _fit_and_score now returns a dictionary #17332

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
merged 7 commits into from
Jun 26, 2020

Conversation

thomasjpfan
Copy link
Member

Reference Issues/PRs

Related to #15126

What does this implement/fix? Explain your changes.

The goal of this PR is to make #15126 easily to review.

Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

LGTM.

fit_params=fit_params,
return_n_test_samples=True,
error_score=error_score)
return results["test_scores"], parameters, results["n_test_samples"]
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to get the parameters from the dict?

Suggested change
return results["test_scores"], parameters, results["n_test_samples"]
return results["test_scores"], results["parameters"], results["n_test_samples"]

Copy link
Member Author

Choose a reason for hiding this comment

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

In this case, I would say no. return_parameters is set to false so parameters is not in the dict and fit_grid_point is deprecated.

Copy link
Member

Choose a reason for hiding this comment

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

OK make sense

parameters : dict or None
The parameters that have been evaluated.
estimator : estimator object
The fitted estimator
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The fitted estimator
The fitted estimator.

@glemaitre
Copy link
Member

We are going to have some git fun with some of the PR :)

@adrinjalali
Copy link
Member

ping: merge conflicts

@adrinjalali adrinjalali merged commit 67bf1e7 into scikit-learn:master Jun 26, 2020
@alfaro96
Copy link
Member

alfaro96 commented Jun 26, 2020

I think that the documentation build was broken 😕.

I am working to fix this as soon as possible!

glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Jul 17, 2020
* ENH _fit_and_score now returns a dictionary

* MRG

* REV

* LOL

* Removing things in gitignore is fun
jayzed82 pushed a commit to jayzed82/scikit-learn that referenced this pull request Oct 22, 2020
* ENH _fit_and_score now returns a dictionary

* MRG

* REV

* LOL

* Removing things in gitignore is fun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants