Skip to content

API Make IterativeImputer experimental #13824

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 12 commits into from
May 8, 2019

Conversation

jnothman
Copy link
Member

@jnothman jnothman commented May 8, 2019

Fixes #13789 .

See #13773. The point is that we've made some design and algorithmic choices that may deserve refinement over the next release or two without requiring backwards compatibility.

We need to either accept or reject this change before release of 0.21.0

@jnothman jnothman added this to the 0.21 milestone May 8, 2019
@jnothman jnothman changed the title Make IterativeImputer experimental API Make IterativeImputer experimental May 8, 2019
@NicolasHug
Copy link
Member

You'll also need to import enable_... in conf.py for the docs to render properly I think

@jnothman
Copy link
Member Author

jnothman commented May 8, 2019 via email

@jnothman jnothman mentioned this pull request May 8, 2019
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.

IRL @ogrisel was only +1. I am on the phone and don't want to merge from there. But it should be enough approval to go ahead.

@@ -105,7 +105,16 @@ of ``y``. This is done for each feature in an iterative fashion, and then is
repeated for ``max_iter`` imputation rounds. The results of the final
imputation round are returned.

.. note::
Copy link
Member

Choose a reason for hiding this comment

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

Could you make a small change in l. 25 and 27 of this file. The hyperlinks does not work:

  • :class:impute.SimpleImputer -> :class:SimpleImputer
  • :class:impute.IterativeImputer -> :class:IterativeImputer

Copy link
Member

@TomDLT TomDLT left a comment

Choose a reason for hiding this comment

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

LGTM except for some copy-paste left-overs.


This estimator is still **experimental** for now: the predictions
and the API might change without any deprecation cycle. To use it,
you need to explicitly import ``enable_hist_gradient_boosting``::
Copy link
Member

Choose a reason for hiding this comment

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

enable_iterative_imputer


>>> # explicitly require this experimental feature
>>> from sklearn.experimental import enable_iterative_imputer # noqa
>>> # now you can import normally from ensemble
Copy link
Member

Choose a reason for hiding this comment

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

from impute


>>> # explicitly require this experimental feature
>>> from sklearn.experimental import enable_iterative_imputer # noqa
>>> # now you can import normally from ensemble
Copy link
Member

Choose a reason for hiding this comment

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

from impute

@jnothman
Copy link
Member Author

jnothman commented May 8, 2019 via email

@jnothman
Copy link
Member Author

jnothman commented May 8, 2019

Sorry for the merge conflicts on KNNImputer, @thomasjpfan!

@jnothman jnothman merged commit 1675e77 into scikit-learn:master May 8, 2019
jnothman added a commit to jnothman/scikit-learn that referenced this pull request May 8, 2019
# discovered properly by sphinx
from sklearn.experimental import enable_hist_gradient_boosting # noqa
Copy link
Member

Choose a reason for hiding this comment

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

@jnothman I believe this does not work as expected:

>>> from sklearn.experimental import *                                                                                                                                          
>>> from sklearn.ensemble import HistGradientBoostingRegressor                                                                                                                  
Traceback (most recent call last):
  File "<ipython-input-5-47b8aeb492fe>", line 1, in <module>
    from sklearn.ensemble import HistGradientBoostingRegressor
ImportError: cannot import name 'HistGradientBoostingRegressor' from 'sklearn.ensemble' (/home/ogrisel/code/scikit-learn/sklearn/ensemble/__init__.py)

>>> from sklearn.experimental import enable_hist_gradient_boosting                                                                                                              
>>> from sklearn.ensemble import HistGradientBoostingRegressor                                                                                                                  
>>> 

koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make IterativeImputer an experimental import, like HistGradientBoostingClassifier
6 participants