Skip to content
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

[MRG] Deprecates gaussian process regression_models and correlation_models. #9717

Merged

Conversation

@thechargedneutron
Copy link
Contributor

@thechargedneutron thechargedneutron commented Sep 8, 2017

Reference Issue

Fixes #9714

What does this implement/fix? Explain your changes.

Removes all the occurrences of regression_models and correlation_models.

Any other comments?

@@ -824,7 +824,7 @@ The empirical best linear unbiased predictor (EBLUP)

Until now, both the autocorrelation and regression models were assumed given.
In practice however they are never known in advance so that one has to make
(motivated) empirical choices for these models :ref:`correlation_models`.
(motivated) empirical choices for these models.

This comment has been minimized.

@amueller

amueller Sep 8, 2017
Member

I feel like this section needs a cleanup

@amueller
Copy link
Member

@amueller amueller commented Sep 8, 2017

you need to deprecate them, not remove them: http://scikit-learn.org/dev/developers/contributing.html#deprecation

@thechargedneutron
Copy link
Contributor Author

@thechargedneutron thechargedneutron commented Sep 8, 2017

@amueller Since regression_models is python file rather than a method or a class, do we need to add deprecation at the top of the file or before each and every function of regression_models ?

@thechargedneutron thechargedneutron force-pushed the thechargedneutron:deprecate_regression_models branch from 4d748e1 to 945130f Sep 8, 2017
@thechargedneutron
Copy link
Contributor Author

@thechargedneutron thechargedneutron commented Sep 9, 2017

@amueller Added deprecation warning before all the functions of the required files. Can you please review and point out the reason for test failure? I am not able to figure out the reason for this failure.
ERROR: /home/travis/build/scikit-learn/scikit-learn/sklearn/tests/test_common.py.test_non_meta_estimators:check_estimators_pickle(GaussianProcess).

@agramfort
Copy link
Member

@agramfort agramfort commented Sep 10, 2017

@thechargedneutron you need to capture warning in test suite now and remove these functions from examples and narrative doc.

@thechargedneutron
Copy link
Contributor Author

@thechargedneutron thechargedneutron commented Sep 10, 2017

@agramfort So, we have check_estimators_pickle which is causing the failure in case of GaussianProcess, but we already have @ignore_warnings above this function. What is it doing?
I understand something needs to be changed before yield check_estimators_pickle but can't figure out. Can you help? :(

@thechargedneutron
Copy link
Contributor Author

@thechargedneutron thechargedneutron commented Sep 14, 2017

I am not able to figure out the exact change I need to make in order to avoid this error. Using @ignore_warnings above fit in GaussianProcess raises an error in check_fit_score_takes_y (The error arises here: args = [p.name for p in signature(func).parameters.values()] . I tried quite a few things but could not avoid the error. :( Help!!

@jnothman
Copy link
Member

@jnothman jnothman commented Sep 15, 2017

@jnothman
Copy link
Member

@jnothman jnothman commented Sep 17, 2017

You're currently failing on a doctest in doc/modules/gaussian_process.rst. I think that entire section on Legacy Gaussian Processes should be deleted. You can do so in this PR.

@thechargedneutron
Copy link
Contributor Author

@thechargedneutron thechargedneutron commented Sep 17, 2017

Yes, but I have skipped the pickling test for GaussianProcess. I don't feel that's acceptable. I was getting pickling error (please see an earlier commit failure log). If this is acceptable, I would do the rest in no time. :)

Copy link
Member

@jnothman jnothman left a comment

Hmmm... A deprecated public function should in theory be picklable if it's built the right way (since it can be reconstructed as a fixed-named attribute of a module); but it probably isn't built the right way. Sorry if that's not a very helpful comment.

@thechargedneutron
Copy link
Contributor Author

@thechargedneutron thechargedneutron commented Sep 17, 2017

Can you point out the mistake in last commit? Why is it unpickable? I guess I need to catch warning somewhere, but I could not find where to.

@jnothman
Copy link
Member

@jnothman jnothman commented Sep 18, 2017

See #9787 which should resolve your issue

@jnothman
Copy link
Member

@jnothman jnothman commented Sep 18, 2017

But please also do remove the legacy documentation from gaussian_process.rst

@jnothman
Copy link
Member

@jnothman jnothman commented Sep 18, 2017

#9787 has been merged, so you can put the pickling test back

@jnothman
Copy link
Member

@jnothman jnothman commented Sep 18, 2017

LGTM assuming tests pass!

@thechargedneutron thechargedneutron changed the title [WIP] Deprecates gaussian process regression_models and correlation_models. [MRG] Deprecates gaussian process regression_models and correlation_models. Sep 18, 2017
@thechargedneutron
Copy link
Contributor Author

@thechargedneutron thechargedneutron commented Sep 22, 2017

@amueller Review please.

@thechargedneutron
Copy link
Contributor Author

@thechargedneutron thechargedneutron commented Sep 30, 2017

This needs a second review. Please @amueller or @agramfort or @lesteve . Thanks

@thechargedneutron
Copy link
Contributor Author

@thechargedneutron thechargedneutron commented Oct 12, 2017

@jnothman Could this deprecation be added in 0.19.1?

@jnothman jnothman added this to the 0.19.1 milestone Oct 16, 2017
@jnothman
Copy link
Member

@jnothman jnothman commented Oct 16, 2017

Merging as trivial.

@jnothman jnothman merged commit 01d8a34 into scikit-learn:master Oct 16, 2017
6 checks passed
6 checks passed
ci/circleci Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 96.17%)
Details
codecov/project 96.17% (+<.01%) compared to 7400775
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
lgtm analysis: Python No alert changes
Details
jnothman added a commit to jnothman/scikit-learn that referenced this pull request Oct 16, 2017
@thechargedneutron thechargedneutron deleted the thechargedneutron:deprecate_regression_models branch Oct 17, 2017
@lesteve
Copy link
Member

@lesteve lesteve commented Oct 17, 2017

@jnothman given that this will be merged in 0.19.1, the deprecation messages are misleading: they say deprecated in 0.20 removed in 0.22.

@lesteve
Copy link
Member

@lesteve lesteve commented Oct 18, 2017

@jnothman I cherry-picked 99eadd4 in master. I assume you left the removal in 0.22 intentionally to err on the conservative side (I don't think it matters that much to be honest).

@jnothman
Copy link
Member

@jnothman jnothman commented Oct 18, 2017

maskani-moh added a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants