DOC Fix new sphinx warnings
@@ -16,10 +16,12 @@ diabetes patients. This example shows how to use SelectFromModel and LassoCv to
find the best two features predicting disease progression after one year from
the baseline.
-Authors: Manoj Kumar <mks542@nyu.edu>
- Maria Telenczuk <https://github.com/maikia>
+Authors: `Manoj Kumar <mks542@nyu.edu>`_,
+`Maria Telenczuk <https://github.com/maikia>`_
+
License: BSD 3 clause
"""
+
print(__doc__)
import matplotlib.pyplot as plt
@@ -50,8 +52,8 @@ print(feature_names)
# ---------------------------------------------------------
#
# To decide on the importance of the features we are going to use LassoCV
-# estimator. The features with the highest absolute coef_ value are considered
-# the most important
+# estimator. The features with the highest absolute `coef_` value are
+# considered the most important
clf = LassoCV().fit(X, y)
importance = np.abs(clf.coef_)
@@ -63,9 +65,9 @@ print(importance)
#
# Now we want to select the two features which are the most important.
# SelectFromModel() allows for setting the threshold. Only the features with
-# the coef_ higher than the threshold will remain. Here, we want to set the
-# threshold slightly above the third highest coef_ calculated by LassoCV() from
-# our data.
+# the `coef_` higher than the threshold will remain. Here, we want to set the
+# threshold slightly above the third highest `coef_` calculated by LassoCV()
+# from our data.
idx_third = importance.argsort()[-3]
threshold = importance[idx_third] + 0.01
