Skip to content

Commit defa034

Browse files
committed
Pushing the docs to dev/ for branch: main, commit adb47e7c142ce6d699cc5927925d448cb2c1ab91
1 parent 5681c77 commit defa034

File tree

1,238 files changed

+4606
-4497
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,238 files changed

+4606
-4497
lines changed
Binary file not shown.

Diff for: dev/_downloads/21b82d82985712b5de6347f382c77c86/plot_partial_dependence.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
},
7070
"outputs": [],
7171
"source": [
72-
"from sklearn.inspection import PartialDependenceDisplay\n\ncommon_params = {\"subsample\": 50, \"n_jobs\": 2, \"grid_resolution\": 20, \"random_state\": 0}\n\nprint(\"Computing partial dependence plots...\")\ntic = time()\ndisplay = PartialDependenceDisplay.from_estimator(\n est,\n X_train,\n features=[\"MedInc\", \"AveOccup\", \"HouseAge\", \"AveRooms\"],\n kind=\"both\",\n **common_params,\n)\nprint(f\"done in {time() - tic:.3f}s\")\ndisplay.figure_.suptitle(\n \"Partial dependence of house value on non-location features\\n\"\n \"for the California housing dataset, with MLPRegressor\"\n)\ndisplay.figure_.subplots_adjust(hspace=0.3)"
72+
"from sklearn.inspection import PartialDependenceDisplay\n\ncommon_params = {\n \"subsample\": 50,\n \"n_jobs\": 2,\n \"grid_resolution\": 20,\n \"centered\": True,\n \"random_state\": 0,\n}\n\nprint(\"Computing partial dependence plots...\")\ntic = time()\ndisplay = PartialDependenceDisplay.from_estimator(\n est,\n X_train,\n features=[\"MedInc\", \"AveOccup\", \"HouseAge\", \"AveRooms\"],\n kind=\"both\",\n **common_params,\n)\nprint(f\"done in {time() - tic:.3f}s\")\ndisplay.figure_.suptitle(\n \"Partial dependence of house value on non-location features\\n\"\n \"for the California housing dataset, with MLPRegressor\"\n)\ndisplay.figure_.subplots_adjust(hspace=0.3)"
7373
]
7474
},
7575
{
@@ -112,7 +112,7 @@
112112
"cell_type": "markdown",
113113
"metadata": {},
114114
"source": [
115-
"### Analysis of the plots\n\nWe can clearly see on the PDPs (dashed orange line) that the median house price\nshows a linear relationship with the median income (top left) and that the\nhouse price drops when the average occupants per household increases (top\nmiddle). The top right plot shows that the house age in a district does not\nhave a strong influence on the (median) house price; so does the average\nrooms per household.\n\nThe ICE curves (light blue lines) complement the analysis: we can see that\nthere are some exceptions, where the house price remain constant with median\nincome and average occupants. On the other hand, while the house age (top\nright) does not have a strong influence on the median house price on average,\nthere seems to be a number of exceptions where the house price increase when\nbetween the ages 15-25. Similar exceptions can be observed for the average\nnumber of rooms (bottom left). Therefore, ICE plots show some individual\neffect which are attenuated by taking the averages.\n\nIn all plots, the tick marks on the x-axis represent the deciles of the\nfeature values in the training data.\n\nWe also observe that :class:`~sklearn.neural_network.MLPRegressor` has much\nsmoother predictions than\n:class:`~sklearn.ensemble.HistGradientBoostingRegressor`.\n\nHowever, it is worth noting that we are creating potential meaningless\nsynthetic samples if features are correlated.\n\n"
115+
"### Analysis of the plots\n\nWe can clearly see on the PDPs (dashed orange line) that the median house price\nshows a linear relationship with the median income (top left) and that the\nhouse price drops when the average occupants per household increases (top\nmiddle). The top right plot shows that the house age in a district does not\nhave a strong influence on the (median) house price; so does the average\nrooms per household.\n\nThe ICE curves (light blue lines) complement the analysis: we can see that\nthere are some exceptions (which are better highlighted with the option\n`centered=True`), where the house price remains constant with respect to\nmedian income and average occupants variations.\nOn the other hand, while the house age (top right) does not have a strong\ninfluence on the median house price on average, there seems to be a number\nof exceptions where the house price increases when\nbetween the ages 15-25. Similar exceptions can be observed for the average\nnumber of rooms (bottom left). Therefore, ICE plots show some individual\neffect which are attenuated by taking the averages.\n\nIn all plots, the tick marks on the x-axis represent the deciles of the\nfeature values in the training data.\n\nWe also observe that :class:`~sklearn.neural_network.MLPRegressor` has much\nsmoother predictions than\n:class:`~sklearn.ensemble.HistGradientBoostingRegressor`.\n\nHowever, it is worth noting that we are creating potential meaningless\nsynthetic samples if features are correlated.\n\n"
116116
]
117117
},
118118
{
Binary file not shown.

Diff for: dev/_downloads/bcd609cfe29c9da1f51c848e18b89c76/plot_partial_dependence.py

+13-5
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,13 @@
113113

114114
from sklearn.inspection import PartialDependenceDisplay
115115

116-
common_params = {"subsample": 50, "n_jobs": 2, "grid_resolution": 20, "random_state": 0}
116+
common_params = {
117+
"subsample": 50,
118+
"n_jobs": 2,
119+
"grid_resolution": 20,
120+
"centered": True,
121+
"random_state": 0,
122+
}
117123

118124
print("Computing partial dependence plots...")
119125
tic = time()
@@ -188,10 +194,12 @@
188194
# rooms per household.
189195
#
190196
# The ICE curves (light blue lines) complement the analysis: we can see that
191-
# there are some exceptions, where the house price remain constant with median
192-
# income and average occupants. On the other hand, while the house age (top
193-
# right) does not have a strong influence on the median house price on average,
194-
# there seems to be a number of exceptions where the house price increase when
197+
# there are some exceptions (which are better highlighted with the option
198+
# `centered=True`), where the house price remains constant with respect to
199+
# median income and average occupants variations.
200+
# On the other hand, while the house age (top right) does not have a strong
201+
# influence on the median house price on average, there seems to be a number
202+
# of exceptions where the house price increases when
195203
# between the ages 15-25. Similar exceptions can be observed for the average
196204
# number of rooms (bottom left). Therefore, ICE plots show some individual
197205
# effect which are attenuated by taking the averages.

Diff for: dev/_downloads/scikit-learn-docs.zip

-50 KB
Binary file not shown.
258 Bytes
215 Bytes
-110 Bytes
-93 Bytes
75 Bytes

Diff for: dev/_images/sphx_glr_plot_anomaly_comparison_001.png

137 Bytes
-1 Bytes
100 Bytes
-246 Bytes

Diff for: dev/_images/sphx_glr_plot_calibration_curve_002.png

14 Bytes

Diff for: dev/_images/sphx_glr_plot_cluster_comparison_001.png

215 Bytes
-25 Bytes

Diff for: dev/_images/sphx_glr_plot_coin_segmentation_001.png

7 Bytes

Diff for: dev/_images/sphx_glr_plot_coin_segmentation_002.png

-184 Bytes

Diff for: dev/_images/sphx_glr_plot_coin_segmentation_003.png

24 Bytes
13 Bytes
-377 Bytes
-41 Bytes

Diff for: dev/_images/sphx_glr_plot_dict_face_patches_001.png

-14 Bytes
-5 Bytes

Diff for: dev/_images/sphx_glr_plot_digits_pipe_001.png

-2 Bytes

Diff for: dev/_images/sphx_glr_plot_digits_pipe_thumb.png

56 Bytes

Diff for: dev/_images/sphx_glr_plot_gmm_init_001.png

-176 Bytes

Diff for: dev/_images/sphx_glr_plot_gmm_init_thumb.png

1 Byte
-589 Bytes
-563 Bytes
-184 Bytes

Diff for: dev/_images/sphx_glr_plot_image_denoising_002.png

-156 Bytes

Diff for: dev/_images/sphx_glr_plot_image_denoising_003.png

-147 Bytes

Diff for: dev/_images/sphx_glr_plot_image_denoising_005.png

4 Bytes
-920 Bytes
-90 Bytes
96 Bytes
494 Bytes
6 Bytes
67 Bytes
-68 Bytes

Diff for: dev/_images/sphx_glr_plot_learning_curve_001.png

-2.26 KB

Diff for: dev/_images/sphx_glr_plot_learning_curve_thumb.png

19 Bytes

Diff for: dev/_images/sphx_glr_plot_linkage_comparison_001.png

-36 Bytes
14 Bytes

Diff for: dev/_images/sphx_glr_plot_lle_digits_004.png

90 Bytes

Diff for: dev/_images/sphx_glr_plot_lle_digits_005.png

107 Bytes

Diff for: dev/_images/sphx_glr_plot_lle_digits_006.png

95 Bytes

Diff for: dev/_images/sphx_glr_plot_lle_digits_007.png

-166 Bytes

Diff for: dev/_images/sphx_glr_plot_lle_digits_008.png

-16 Bytes

Diff for: dev/_images/sphx_glr_plot_lle_digits_009.png

-17 Bytes

Diff for: dev/_images/sphx_glr_plot_lle_digits_010.png

-189 Bytes

Diff for: dev/_images/sphx_glr_plot_lle_digits_011.png

12 Bytes

Diff for: dev/_images/sphx_glr_plot_lle_digits_012.png

-157 Bytes

Diff for: dev/_images/sphx_glr_plot_lle_digits_013.png

7 Bytes

Diff for: dev/_images/sphx_glr_plot_lle_digits_014.png

-67 Bytes

Diff for: dev/_images/sphx_glr_plot_manifold_sphere_001.png

94 Bytes

Diff for: dev/_images/sphx_glr_plot_manifold_sphere_thumb.png

-14 Bytes
-669 Bytes
671 Bytes
-374 Bytes
-482 Bytes
352 Bytes
133 Bytes
-12 Bytes

Diff for: dev/_images/sphx_glr_plot_partial_dependence_001.png

-15.5 KB

Diff for: dev/_images/sphx_glr_plot_partial_dependence_002.png

-19.2 KB

Diff for: dev/_images/sphx_glr_plot_partial_dependence_003.png

-11.8 KB
-9.85 KB

Diff for: dev/_images/sphx_glr_plot_prediction_latency_001.png

855 Bytes

Diff for: dev/_images/sphx_glr_plot_prediction_latency_002.png

878 Bytes

Diff for: dev/_images/sphx_glr_plot_prediction_latency_003.png

2.67 KB

Diff for: dev/_images/sphx_glr_plot_prediction_latency_004.png

-1.63 KB
314 Bytes
1.47 KB
831 Bytes
13 Bytes
-130 Bytes

Diff for: dev/_images/sphx_glr_plot_sgd_early_stopping_001.png

77 Bytes
-71 Bytes

Diff for: dev/_images/sphx_glr_plot_stack_predictors_001.png

99 Bytes

Diff for: dev/_images/sphx_glr_plot_stack_predictors_thumb.png

-6 Bytes
-102 Bytes
-85 Bytes

Diff for: dev/_images/sphx_glr_plot_theilsen_001.png

-2 Bytes

Diff for: dev/_images/sphx_glr_plot_theilsen_thumb.png

-2 Bytes

Diff for: dev/_sources/auto_examples/applications/plot_cyclical_feature_engineering.rst.txt

+1-1

Diff for: dev/_sources/auto_examples/applications/plot_digits_denoising.rst.txt

+1-1

Diff for: dev/_sources/auto_examples/applications/plot_face_recognition.rst.txt

+5-5

Diff for: dev/_sources/auto_examples/applications/plot_model_complexity_influence.rst.txt

+15-15

0 commit comments

Comments
 (0)