[MRG] Make modules private in feature_selection
diff --git a/.gitignore b/.gitignore
index e1c663693a43a..9b158da07a2ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -223,3 +223,10 @@ sklearn/semi_supervised/label_propagation.py
 
 sklearn/preprocessing/data.py
 sklearn/preprocessing/label.py
+
+sklearn/feature_selection/base.py
+sklearn/feature_selection/from_model.py
+sklearn/feature_selection/mutual_info.py
+sklearn/feature_selection/rfe.py
+sklearn/feature_selection/univariate_selection.py
+sklearn/feature_selection/variance_threshold.py
diff --git a/sklearn/_build_utils/deprecated_modules.py b/sklearn/_build_utils/deprecated_modules.py
index ccd18461a2008..e5963dcdf297a 100644
--- a/sklearn/_build_utils/deprecated_modules.py
+++ b/sklearn/_build_utils/deprecated_modules.py
@@ -248,6 +248,21 @@
     ('_label', 'sklearn.preprocessing.label', 'sklearn.preprocessing',
      'LabelEncoder'),
 
+    ('_base', 'sklearn.feature_selection.base', 'sklearn.feature_selection',
+     'SelectorMixin'),
+    ('_from_model', 'sklearn.feature_selection.from_model',
+     'sklearn.feature_selection', 'SelectFromModel'),
+    ('_mutual_info', 'sklearn.feature_selection.mutual_info',
+     'sklearn.feature_selection', 'mutual_info_regression'),
+    ('_rfe', 'sklearn.feature_selection.rfe',
+     'sklearn.feature_selection.rfe', 'RFE'),
+    ('_univariate_selection',
+     'sklearn.feature_selection.univariate_selection',
+     'sklearn.feature_selection', 'chi2'),
+    ('_variance_threshold',
+     'sklearn.feature_selection.variance_threshold',
+     'sklearn.feature_selection', 'VarianceThreshold'),
+
     ('_testing', 'sklearn.utils.testing', 'sklearn.utils',
      'all_estimators'),
 ]
diff --git a/sklearn/feature_selection/__init__.py b/sklearn/feature_selection/__init__.py
index ffa392b5b26db..f8bda21a5813d 100644
--- a/sklearn/feature_selection/__init__.py
+++ b/sklearn/feature_selection/__init__.py
@@ -4,25 +4,25 @@
 recursive feature elimination algorithm.
 """
 
-from .univariate_selection import chi2
-from .univariate_selection import f_classif
-from .univariate_selection import f_oneway
-from .univariate_selection import f_regression
-from .univariate_selection import SelectPercentile
-from .univariate_selection import SelectKBest
-from .univariate_selection import SelectFpr
-from .univariate_selection import SelectFdr
-from .univariate_selection import SelectFwe
-from .univariate_selection import GenericUnivariateSelect
+from ._univariate_selection import chi2
+from ._univariate_selection import f_classif
+from ._univariate_selection import f_oneway
+from ._univariate_selection import f_regression
+from ._univariate_selection import SelectPercentile
+from ._univariate_selection import SelectKBest
+from ._univariate_selection import SelectFpr
+from ._univariate_selection import SelectFdr
+from ._univariate_selection import SelectFwe
+from ._univariate_selection import GenericUnivariateSelect
 
-from .variance_threshold import VarianceThreshold
+from ._variance_threshold import VarianceThreshold
 
-from .rfe import RFE
-from .rfe import RFECV
+from ._rfe import RFE
+from ._rfe import RFECV
 
-from .from_model import SelectFromModel
+from ._from_model import SelectFromModel
 
-from .mutual_info_ import mutual_info_regression, mutual_info_classif
+from ._mutual_info import mutual_info_regression, mutual_info_classif
 
 
 __all__ = ['GenericUnivariateSelect',
diff --git a/sklearn/feature_selection/base.py b/sklearn/feature_selection/_base.py
similarity index 100%
rename from sklearn/feature_selection/base.py
rename to sklearn/feature_selection/_base.py
diff --git a/sklearn/feature_selection/from_model.py b/sklearn/feature_selection/_from_model.py
similarity index 99%
rename from sklearn/feature_selection/from_model.py
rename to sklearn/feature_selection/_from_model.py
index 2ab69184a3895..3e324fbec5535 100644
--- a/sklearn/feature_selection/from_model.py
+++ b/sklearn/feature_selection/_from_model.py
@@ -4,7 +4,7 @@
 import numpy as np
 import numbers
 
-from .base import SelectorMixin
+from ._base import SelectorMixin
 from ..base import BaseEstimator, clone, MetaEstimatorMixin
 
 from ..exceptions import NotFittedError
diff --git a/sklearn/feature_selection/mutual_info_.py b/sklearn/feature_selection/_mutual_info.py
similarity index 100%
rename from sklearn/feature_selection/mutual_info_.py
rename to sklearn/feature_selection/_mutual_info.py
diff --git a/sklearn/feature_selection/rfe.py b/sklearn/feature_selection/_rfe.py
similarity index 99%
rename from sklearn/feature_selection/rfe.py
rename to sklearn/feature_selection/_rfe.py
index 818af920f7616..86362f27ef181 100644
--- a/sklearn/feature_selection/rfe.py
+++ b/sklearn/feature_selection/_rfe.py
@@ -20,7 +20,7 @@
 from ..model_selection import check_cv
 from ..model_selection._validation import _score
 from ..metrics import check_scoring
-from .base import SelectorMixin
+from ._base import SelectorMixin
 
 
 def _rfe_single_fit(rfe, estimator, X, y, train, test, scorer):
diff --git a/sklearn/feature_selection/univariate_selection.py b/sklearn/feature_selection/_univariate_selection.py
similarity index 99%
rename from sklearn/feature_selection/univariate_selection.py
rename to sklearn/feature_selection/_univariate_selection.py
index 0be1dadbcafea..21990bb3a8167 100644
--- a/sklearn/feature_selection/univariate_selection.py
+++ b/sklearn/feature_selection/_univariate_selection.py
@@ -17,7 +17,7 @@
                      safe_mask)
 from ..utils.extmath import safe_sparse_dot, row_norms
 from ..utils.validation import check_is_fitted
-from .base import SelectorMixin
+from ._base import SelectorMixin
 
 
 def _clean_nans(scores):
diff --git a/sklearn/feature_selection/variance_threshold.py b/sklearn/feature_selection/_variance_threshold.py
similarity index 98%
rename from sklearn/feature_selection/variance_threshold.py
rename to sklearn/feature_selection/_variance_threshold.py
index 62323f1ff2ec8..15576fe31025c 100644
--- a/sklearn/feature_selection/variance_threshold.py
+++ b/sklearn/feature_selection/_variance_threshold.py
@@ -3,7 +3,7 @@
 
 import numpy as np
 from ..base import BaseEstimator
-from .base import SelectorMixin
+from ._base import SelectorMixin
 from ..utils import check_array
 from ..utils.sparsefuncs import mean_variance_axis, min_max_axis
 from ..utils.validation import check_is_fitted
diff --git a/sklearn/feature_selection/tests/test_base.py b/sklearn/feature_selection/tests/test_base.py
index 428528ad75b28..d1aaccde0efa3 100644
--- a/sklearn/feature_selection/tests/test_base.py
+++ b/sklearn/feature_selection/tests/test_base.py
@@ -5,7 +5,7 @@
 from numpy.testing import assert_array_equal
 
 from sklearn.base import BaseEstimator
-from sklearn.feature_selection.base import SelectorMixin
+from sklearn.feature_selection._base import SelectorMixin
 from sklearn.utils import check_array
 
 
diff --git a/sklearn/feature_selection/tests/test_chi2.py b/sklearn/feature_selection/tests/test_chi2.py
index 232d31f81b76e..29a027bdb27a2 100644
--- a/sklearn/feature_selection/tests/test_chi2.py
+++ b/sklearn/feature_selection/tests/test_chi2.py
@@ -11,7 +11,7 @@
 import scipy.stats
 
 from sklearn.feature_selection import SelectKBest, chi2
-from sklearn.feature_selection.univariate_selection import _chisquare
+from sklearn.feature_selection._univariate_selection import _chisquare
 from sklearn.utils._testing import assert_array_almost_equal
 from sklearn.utils._testing import assert_array_equal
 
diff --git a/sklearn/feature_selection/tests/test_mutual_info.py b/sklearn/feature_selection/tests/test_mutual_info.py
index a431a64a4f17d..ca2459f365ba4 100644
--- a/sklearn/feature_selection/tests/test_mutual_info.py
+++ b/sklearn/feature_selection/tests/test_mutual_info.py
@@ -5,8 +5,9 @@
 
 from sklearn.utils import check_random_state
 from sklearn.utils._testing import assert_array_equal, assert_almost_equal
-from sklearn.feature_selection.mutual_info_ import (
-    mutual_info_regression, mutual_info_classif, _compute_mi)
+from sklearn.feature_selection._mutual_info import _compute_mi
+from sklearn.feature_selection import (mutual_info_regression,
+                                       mutual_info_classif)
 
 
 def test_compute_mi_dd():
diff --git a/sklearn/feature_selection/tests/test_rfe.py b/sklearn/feature_selection/tests/test_rfe.py
index 22720b7caa3a5..724c749ee636b 100644
--- a/sklearn/feature_selection/tests/test_rfe.py
+++ b/sklearn/feature_selection/tests/test_rfe.py
@@ -6,7 +6,7 @@
 from numpy.testing import assert_array_almost_equal, assert_array_equal
 from scipy import sparse
 
-from sklearn.feature_selection.rfe import RFE, RFECV
+from sklearn.feature_selection import RFE, RFECV
 from sklearn.datasets import load_iris, make_friedman1
 from sklearn.metrics import zero_one_loss
 from sklearn.svm import SVC, SVR

<!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->

#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the issues or pull requests
you resolved, so that they will automatically be closed when your pull request
is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests
-->
Partially addresses https://github.com/scikit-learn/scikit-learn/issues/9250

#### Any other comments?
CC @NicolasHug @adrinjalali 

<!--
Please be aware that we are a loose team of volunteers so patience is
necessary; assistance handling other issues is very welcome. We value
all user contributions, no matter how minor they are. If we are slow to
review, either the pull request needs some benchmarking, tinkering,
convincing, etc. or more likely the reviewers are simply busy. In either
case, we ask for your understanding during the review process.
For more information, see our FAQ on this topic:
http://scikit-learn.org/dev/faq.html#why-is-my-pull-request-not-getting-any-attention.

Thanks for contributing!
-->
