enable_iterative_imputer.py 688 B

1234567891011121314151617181920
  1. """Enables IterativeImputer
  2. The API and results of this estimator might change without any deprecation
  3. cycle.
  4. Importing this file dynamically sets :class:`~sklearn.impute.IterativeImputer`
  5. as an attribute of the impute module::
  6. >>> # explicitly require this experimental feature
  7. >>> from sklearn.experimental import enable_iterative_imputer # noqa
  8. >>> # now you can import normally from impute
  9. >>> from sklearn.impute import IterativeImputer
  10. """
  11. from .. import impute
  12. from ..impute._iterative import IterativeImputer
  13. # use settattr to avoid mypy errors when monkeypatching
  14. setattr(impute, "IterativeImputer", IterativeImputer)
  15. impute.__all__ += ["IterativeImputer"]