Skip to content

Commit 4d15cb6

Browse files
committed
Pushing the docs to dev/ for branch: main, commit 845b1fac9e8bcfc146e7b38119ce6c500e00a10b
1 parent 9395a41 commit 4d15cb6

File tree

1,261 files changed

+4482
-4470
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,261 files changed

+4482
-4470
lines changed
Binary file not shown.

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
},
5252
"outputs": [],
5353
"source": [
54-
"from time import time\nfrom sklearn.pipeline import make_pipeline\nfrom sklearn.preprocessing import QuantileTransformer\nfrom sklearn.neural_network import MLPRegressor\n\nprint(\"Training MLPRegressor...\")\ntic = time()\nest = make_pipeline(\n QuantileTransformer(),\n MLPRegressor(\n hidden_layer_sizes=(50, 50), learning_rate_init=0.01, early_stopping=True\n ),\n)\nest.fit(X_train, y_train)\nprint(f\"done in {time() - tic:.3f}s\")\nprint(f\"Test R2 score: {est.score(X_test, y_test):.2f}\")"
54+
"from time import time\nfrom sklearn.pipeline import make_pipeline\nfrom sklearn.preprocessing import QuantileTransformer\nfrom sklearn.neural_network import MLPRegressor\n\nprint(\"Training MLPRegressor...\")\ntic = time()\nest = make_pipeline(\n QuantileTransformer(),\n MLPRegressor(\n hidden_layer_sizes=(30, 15),\n learning_rate_init=0.01,\n early_stopping=True,\n random_state=0,\n ),\n)\nest.fit(X_train, y_train)\nprint(f\"done in {time() - tic:.3f}s\")\nprint(f\"Test R2 score: {est.score(X_test, y_test):.2f}\")"
5555
]
5656
},
5757
{
@@ -87,7 +87,7 @@
8787
},
8888
"outputs": [],
8989
"source": [
90-
"from sklearn.ensemble import HistGradientBoostingRegressor\n\nprint(\"Training HistGradientBoostingRegressor...\")\ntic = time()\nest = HistGradientBoostingRegressor()\nest.fit(X_train, y_train)\nprint(f\"done in {time() - tic:.3f}s\")\nprint(f\"Test R2 score: {est.score(X_test, y_test):.2f}\")"
90+
"from sklearn.ensemble import HistGradientBoostingRegressor\n\nprint(\"Training HistGradientBoostingRegressor...\")\ntic = time()\nest = HistGradientBoostingRegressor(random_state=0)\nest.fit(X_train, y_train)\nprint(f\"done in {time() - tic:.3f}s\")\nprint(f\"Test R2 score: {est.score(X_test, y_test):.2f}\")"
9191
]
9292
},
9393
{
@@ -130,7 +130,7 @@
130130
},
131131
"outputs": [],
132132
"source": [
133-
"features = [\"AveOccup\", \"HouseAge\", (\"AveOccup\", \"HouseAge\")]\nprint(\"Computing partial dependence plots...\")\ntic = time()\n_, ax = plt.subplots(ncols=3, figsize=(9, 4))\ndisplay = PartialDependenceDisplay.from_estimator(\n est,\n X_train,\n features,\n kind=\"average\",\n n_jobs=3,\n grid_resolution=20,\n ax=ax,\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 Gradient Boosting\"\n)\ndisplay.figure_.subplots_adjust(wspace=0.4, hspace=0.3)"
133+
"features = [\"AveOccup\", \"HouseAge\", (\"AveOccup\", \"HouseAge\")]\nprint(\"Computing partial dependence plots...\")\ntic = time()\n_, ax = plt.subplots(ncols=3, figsize=(9, 4))\ndisplay = PartialDependenceDisplay.from_estimator(\n est,\n X_train,\n features,\n kind=\"average\",\n n_jobs=2,\n grid_resolution=10,\n ax=ax,\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 Gradient Boosting\"\n)\ndisplay.figure_.subplots_adjust(wspace=0.4, hspace=0.3)"
134134
]
135135
},
136136
{
@@ -148,7 +148,7 @@
148148
},
149149
"outputs": [],
150150
"source": [
151-
"import numpy as np\nfrom mpl_toolkits.mplot3d import Axes3D\n\nfig = plt.figure()\n\nfeatures = (\"AveOccup\", \"HouseAge\")\npdp = partial_dependence(\n est, X_train, features=features, kind=\"average\", grid_resolution=20\n)\nXX, YY = np.meshgrid(pdp[\"values\"][0], pdp[\"values\"][1])\nZ = pdp.average[0].T\nax = Axes3D(fig)\nfig.add_axes(ax)\nsurf = ax.plot_surface(XX, YY, Z, rstride=1, cstride=1, cmap=plt.cm.BuPu, edgecolor=\"k\")\nax.set_xlabel(features[0])\nax.set_ylabel(features[1])\nax.set_zlabel(\"Partial dependence\")\n# pretty init view\nax.view_init(elev=22, azim=122)\nplt.colorbar(surf)\nplt.suptitle(\n \"Partial dependence of house value on median\\n\"\n \"age and average occupancy, with Gradient Boosting\"\n)\nplt.subplots_adjust(top=0.9)\nplt.show()"
151+
"import numpy as np\nfrom mpl_toolkits.mplot3d import Axes3D\n\nfig = plt.figure()\n\nfeatures = (\"AveOccup\", \"HouseAge\")\npdp = partial_dependence(\n est, X_train, features=features, kind=\"average\", grid_resolution=10\n)\nXX, YY = np.meshgrid(pdp[\"values\"][0], pdp[\"values\"][1])\nZ = pdp.average[0].T\nax = Axes3D(fig)\nfig.add_axes(ax)\n\nsurf = ax.plot_surface(XX, YY, Z, rstride=1, cstride=1, cmap=plt.cm.BuPu, edgecolor=\"k\")\nax.set_xlabel(features[0])\nax.set_ylabel(features[1])\nax.set_zlabel(\"Partial dependence\")\n# pretty init view\nax.view_init(elev=22, azim=122)\nplt.colorbar(surf)\nplt.suptitle(\n \"Partial dependence of house value on median\\n\"\n \"age and average occupancy, with Gradient Boosting\"\n)\nplt.subplots_adjust(top=0.9)\nplt.show()"
152152
]
153153
}
154154
],
Binary file not shown.

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

+9-5
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@
8080
est = make_pipeline(
8181
QuantileTransformer(),
8282
MLPRegressor(
83-
hidden_layer_sizes=(50, 50), learning_rate_init=0.01, early_stopping=True
83+
hidden_layer_sizes=(30, 15),
84+
learning_rate_init=0.01,
85+
early_stopping=True,
86+
random_state=0,
8487
),
8588
)
8689
est.fit(X_train, y_train)
@@ -145,7 +148,7 @@
145148

146149
print("Training HistGradientBoostingRegressor...")
147150
tic = time()
148-
est = HistGradientBoostingRegressor()
151+
est = HistGradientBoostingRegressor(random_state=0)
149152
est.fit(X_train, y_train)
150153
print(f"done in {time() - tic:.3f}s")
151154
print(f"Test R2 score: {est.score(X_test, y_test):.2f}")
@@ -233,8 +236,8 @@
233236
X_train,
234237
features,
235238
kind="average",
236-
n_jobs=3,
237-
grid_resolution=20,
239+
n_jobs=2,
240+
grid_resolution=10,
238241
ax=ax,
239242
)
240243
print(f"done in {time() - tic:.3f}s")
@@ -265,12 +268,13 @@
265268

266269
features = ("AveOccup", "HouseAge")
267270
pdp = partial_dependence(
268-
est, X_train, features=features, kind="average", grid_resolution=20
271+
est, X_train, features=features, kind="average", grid_resolution=10
269272
)
270273
XX, YY = np.meshgrid(pdp["values"][0], pdp["values"][1])
271274
Z = pdp.average[0].T
272275
ax = Axes3D(fig)
273276
fig.add_axes(ax)
277+
274278
surf = ax.plot_surface(XX, YY, Z, rstride=1, cstride=1, cmap=plt.cm.BuPu, edgecolor="k")
275279
ax.set_xlabel(features[0])
276280
ax.set_ylabel(features[1])

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

-49.3 KB
Binary file not shown.
-153 Bytes
3 Bytes
-243 Bytes
-161 Bytes
-48 Bytes

Diff for: dev/_images/sphx_glr_plot_anomaly_comparison_001.png

-387 Bytes
18 Bytes
69 Bytes
-93 Bytes

Diff for: dev/_images/sphx_glr_plot_calibration_curve_002.png

1 Byte

Diff for: dev/_images/sphx_glr_plot_cluster_comparison_001.png

-331 Bytes
-181 Bytes

Diff for: dev/_images/sphx_glr_plot_coin_segmentation_001.png

-34 Bytes

Diff for: dev/_images/sphx_glr_plot_coin_segmentation_002.png

-24 Bytes

Diff for: dev/_images/sphx_glr_plot_coin_segmentation_003.png

52 Bytes
-6 Bytes
338 Bytes
41 Bytes

Diff for: dev/_images/sphx_glr_plot_compare_methods_001.png

-13.9 KB

Diff for: dev/_images/sphx_glr_plot_compare_methods_thumb.png

-1.73 KB

Diff for: dev/_images/sphx_glr_plot_det_001.png

104 Bytes

Diff for: dev/_images/sphx_glr_plot_det_thumb.png

200 Bytes

Diff for: dev/_images/sphx_glr_plot_dict_face_patches_001.png

-104 Bytes
-84 Bytes

Diff for: dev/_images/sphx_glr_plot_digits_pipe_001.png

-14 Bytes

Diff for: dev/_images/sphx_glr_plot_digits_pipe_thumb.png

-22 Bytes
148 Bytes
312 Bytes
-232 Bytes
-2.63 KB
-914 Bytes
8 Bytes
-54 Bytes
58 Bytes
-16 Bytes
18 Bytes
-277 Bytes
253 Bytes
-95 Bytes
250 Bytes

Diff for: dev/_images/sphx_glr_plot_image_denoising_001.png

19 Bytes

Diff for: dev/_images/sphx_glr_plot_image_denoising_003.png

157 Bytes

Diff for: dev/_images/sphx_glr_plot_image_denoising_004.png

8 Bytes

Diff for: dev/_images/sphx_glr_plot_image_denoising_005.png

58 Bytes

Diff for: dev/_images/sphx_glr_plot_image_denoising_thumb.png

4 Bytes
1.19 KB
187 Bytes
-15.2 KB
-81 Bytes
-595 Bytes
225 Bytes
-267 Bytes
0 Bytes
6 Bytes
27 Bytes
395 Bytes
9 Bytes
62 Bytes
5 Bytes

Diff for: dev/_images/sphx_glr_plot_learning_curve_001.png

1.18 KB

Diff for: dev/_images/sphx_glr_plot_learning_curve_thumb.png

129 Bytes

Diff for: dev/_images/sphx_glr_plot_linkage_comparison_001.png

-973 Bytes
-37 Bytes

Diff for: dev/_images/sphx_glr_plot_lle_digits_002.png

-4.63 KB

Diff for: dev/_images/sphx_glr_plot_manifold_sphere_001.png

1.29 KB

Diff for: dev/_images/sphx_glr_plot_manifold_sphere_thumb.png

-4 Bytes

Diff for: dev/_images/sphx_glr_plot_mds_001.png

-49 Bytes

Diff for: dev/_images/sphx_glr_plot_mds_thumb.png

283 Bytes

Diff for: dev/_images/sphx_glr_plot_mini_batch_kmeans_001.png

-222 Bytes
7 Bytes
-2.38 KB
297 Bytes
-19 Bytes
-790 Bytes
376 Bytes
-869 Bytes
1.52 KB

Diff for: dev/_images/sphx_glr_plot_partial_dependence_001.png

911 Bytes

Diff for: dev/_images/sphx_glr_plot_partial_dependence_002.png

861 Bytes

Diff for: dev/_images/sphx_glr_plot_partial_dependence_003.png

318 Bytes

Diff for: dev/_images/sphx_glr_plot_partial_dependence_004.png

-11.4 KB
624 Bytes

Diff for: dev/_images/sphx_glr_plot_prediction_latency_001.png

79 Bytes

Diff for: dev/_images/sphx_glr_plot_prediction_latency_002.png

-33 Bytes

Diff for: dev/_images/sphx_glr_plot_prediction_latency_003.png

900 Bytes

Diff for: dev/_images/sphx_glr_plot_prediction_latency_004.png

714 Bytes
93 Bytes
-825 Bytes
-21 Bytes
-172 Bytes
-82 Bytes

Diff for: dev/_images/sphx_glr_plot_sgd_early_stopping_001.png

-106 Bytes
-1.32 KB

Diff for: dev/_images/sphx_glr_plot_stack_predictors_001.png

-825 Bytes

Diff for: dev/_images/sphx_glr_plot_stack_predictors_thumb.png

-43 Bytes
156 Bytes
45 Bytes

Diff for: dev/_images/sphx_glr_plot_swissroll_002.png

51 Bytes

Diff for: dev/_images/sphx_glr_plot_swissroll_004.png

198 Bytes

Diff for: dev/_images/sphx_glr_plot_theilsen_001.png

35 Bytes

Diff for: dev/_images/sphx_glr_plot_theilsen_002.png

-69 Bytes

Diff for: dev/_images/sphx_glr_plot_theilsen_thumb.png

8 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)