Skip to content

Commit 3b6e8b2

Browse files
committed
Pushing the docs to dev/ for branch: master, commit bbfa2d456d25172c53994f70d58fa36f2d9bf047
1 parent a7d2326 commit 3b6e8b2

File tree

1,188 files changed

+4016
-4014
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,188 files changed

+4016
-4014
lines changed
Binary file not shown.

dev/_downloads/9a690c19be1584e1c965a01a1e733b2b/plot_select_from_model_diabetes.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
find the best two features predicting disease progression after one year from
1717
the baseline.
1818
19-
Authors: Manoj Kumar <[email protected]>
20-
Maria Telenczuk <https://github.com/maikia>
19+
Authors: `Manoj Kumar <[email protected]>`_,
20+
`Maria Telenczuk <https://github.com/maikia>`_
21+
2122
License: BSD 3 clause
2223
"""
24+
2325
print(__doc__)
2426

2527
import matplotlib.pyplot as plt
@@ -50,8 +52,8 @@
5052
# ---------------------------------------------------------
5153
#
5254
# To decide on the importance of the features we are going to use LassoCV
53-
# estimator. The features with the highest absolute coef_ value are considered
54-
# the most important
55+
# estimator. The features with the highest absolute `coef_` value are
56+
# considered the most important
5557

5658
clf = LassoCV().fit(X, y)
5759
importance = np.abs(clf.coef_)
@@ -63,9 +65,9 @@
6365
#
6466
# Now we want to select the two features which are the most important.
6567
# SelectFromModel() allows for setting the threshold. Only the features with
66-
# the coef_ higher than the threshold will remain. Here, we want to set the
67-
# threshold slightly above the third highest coef_ calculated by LassoCV() from
68-
# our data.
68+
# the `coef_` higher than the threshold will remain. Here, we want to set the
69+
# threshold slightly above the third highest `coef_` calculated by LassoCV()
70+
# from our data.
6971

7072
idx_third = importance.argsort()[-3]
7173
threshold = importance[idx_third] + 0.01

dev/_downloads/a992071b7848e988f9122ebc928e2988/plot_select_from_model_diabetes.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"\n# Feature selection using SelectFromModel and LassoCV\n\n\nUse SelectFromModel meta-transformer along with Lasso to select the best\ncouple of features from the diabetes dataset.\n\nSince the L1 norm promotes sparsity of features we might be interested in\nselecting only a subset of the most interesting features from the dataset. This\nexample shows how to select two the most interesting features from the diabetes\ndataset.\n\nDiabetes dataset consists of 10 variables (features) collected from 442\ndiabetes patients. This example shows how to use SelectFromModel and LassoCv to\nfind the best two features predicting disease progression after one year from\nthe baseline.\n\nAuthors: Manoj Kumar <[email protected]>\n Maria Telenczuk <https://github.com/maikia>\nLicense: BSD 3 clause\n"
18+
"\n# Feature selection using SelectFromModel and LassoCV\n\n\nUse SelectFromModel meta-transformer along with Lasso to select the best\ncouple of features from the diabetes dataset.\n\nSince the L1 norm promotes sparsity of features we might be interested in\nselecting only a subset of the most interesting features from the dataset. This\nexample shows how to select two the most interesting features from the diabetes\ndataset.\n\nDiabetes dataset consists of 10 variables (features) collected from 442\ndiabetes patients. This example shows how to use SelectFromModel and LassoCv to\nfind the best two features predicting disease progression after one year from\nthe baseline.\n\nAuthors: `Manoj Kumar <[email protected]>`_,\n`Maria Telenczuk <https://github.com/maikia>`_\n\nLicense: BSD 3 clause\n"
1919
]
2020
},
2121
{
@@ -51,7 +51,7 @@
5151
"cell_type": "markdown",
5252
"metadata": {},
5353
"source": [
54-
"Find importance of the features\n---------------------------------------------------------\n\nTo decide on the importance of the features we are going to use LassoCV\nestimator. The features with the highest absolute coef_ value are considered\nthe most important\n\n"
54+
"Find importance of the features\n---------------------------------------------------------\n\nTo decide on the importance of the features we are going to use LassoCV\nestimator. The features with the highest absolute `coef_` value are\nconsidered the most important\n\n"
5555
]
5656
},
5757
{
@@ -69,7 +69,7 @@
6969
"cell_type": "markdown",
7070
"metadata": {},
7171
"source": [
72-
"Select from the model features with the higest score\n---------------------------------------------------------\n\nNow we want to select the two features which are the most important.\nSelectFromModel() allows for setting the threshold. Only the features with\nthe coef_ higher than the threshold will remain. Here, we want to set the\nthreshold slightly above the third highest coef_ calculated by LassoCV() from\nour data.\n\n"
72+
"Select from the model features with the higest score\n---------------------------------------------------------\n\nNow we want to select the two features which are the most important.\nSelectFromModel() allows for setting the threshold. Only the features with\nthe `coef_` higher than the threshold will remain. Here, we want to set the\nthreshold slightly above the third highest `coef_` calculated by LassoCV()\nfrom our data.\n\n"
7373
]
7474
},
7575
{
Binary file not shown.

dev/_downloads/scikit-learn-docs.pdf

-12.7 KB
Binary file not shown.

dev/_images/iris.png

0 Bytes

0 commit comments

Comments
 (0)