Skip to content

Commit 7a15f61

Browse files
committed
Pushing the docs to dev/ for branch: main, commit c1cfc4d4f36f9c00413e20d0ef85bed208a502ca
1 parent 3b79068 commit 7a15f61

File tree

1,375 files changed

+5049
-4815
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,375 files changed

+5049
-4815
lines changed
Binary file not shown.

dev/_downloads/138e7c706c17949c3098ff8074b03ce7/plot_release_highlights_1_2_0.py

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,31 @@
6868
)
6969
hist_no_interact.fit(X, y)
7070

71+
# %%
72+
# New and enhanced displays
73+
# -------------------------
74+
# :class:`~metrics.PredictionErrorDisplay` provides a way to analyze regression
75+
# models in a qualitative manner.
76+
import matplotlib.pyplot as plt
77+
from sklearn.metrics import PredictionErrorDisplay
78+
79+
fig, axs = plt.subplots(nrows=1, ncols=2, figsize=(12, 5))
80+
_ = PredictionErrorDisplay.from_estimator(
81+
hist_no_interact, X, y, kind="actual_vs_predicted", ax=axs[0]
82+
)
83+
_ = PredictionErrorDisplay.from_estimator(
84+
hist_no_interact, X, y, kind="residual_vs_predicted", ax=axs[1]
85+
)
86+
87+
# %%
88+
# :class:`~model_selection.LearningCurveDisplay` is now available to plot
89+
# results from :func:`~model_selection.learning_curve`.
90+
from sklearn.model_selection import LearningCurveDisplay
91+
92+
_ = LearningCurveDisplay.from_estimator(
93+
hist_no_interact, X, y, cv=5, n_jobs=2, train_sizes=np.linspace(0.1, 1, 5)
94+
)
95+
7196
# %%
7297
# Faster parser in :func:`~datasets.fetch_openml`
7398
# -----------------------------------------------
@@ -95,10 +120,13 @@
95120
# Improved efficiency of many estimators
96121
# --------------------------------------
97122
# In version 1.1 the efficiency of many estimators relying on the computation of
98-
# pairwise distances was greatly improved for float64 dense input. In version 1.2,
99-
# the efficiency of these estimators was further improved for all combinations of
100-
# float32/float64 and dense/sparse input (for all metrics except euclidean). It
101-
# concerns essentially clustering, manifold learning and neighbor search algorithms.
102-
# A detailed list of the impacted estimators can be found in the
103-
# :ref:`changelog <changes_1_2>`. The main benefits are a reduced memory footprint
123+
# pairwise distances (essentially estimators related to clustering, manifold
124+
# learning and neighbors search algorithms) was greatly improved for float64
125+
# dense input. Efficiency improvement especially were a reduced memory footprint
104126
# and a much better scalability on multi-core machines.
127+
# In version 1.2, the efficiency of these estimators was further improved for all
128+
# combinations of dense and sparse inputs on float32 and float64 datasets, except
129+
# the sparse-dense and dense-sparse combinations for the Euclidean and Squared
130+
# Euclidean Distance metrics.
131+
# A detailed list of the impacted estimators can be found in the
132+
# :ref:`changelog <changes_1_2>`.

dev/_downloads/21b82d82985712b5de6347f382c77c86/plot_partial_dependence.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
},
149149
"outputs": [],
150150
"source": [
151-
"print(\"Training interaction constraint HistGradientBoostingRegressor...\")\ntic = time()\nest_no_interactions = HistGradientBoostingRegressor(\n interaction_cst=[[i] for i in range(X_train.shape[1])]\n)\nest_no_interactions.fit(X_train, y_train)\nprint(f\"done in {time() - tic:.3f}s\")"
151+
"print(\"Training interaction constraint HistGradientBoostingRegressor...\")\ntic = time()\nest_no_interactions = HistGradientBoostingRegressor(interaction_cst=\"no_interactions\")\nest_no_interactions.fit(X_train, y_train)\nprint(f\"done in {time() - tic:.3f}s\")"
152152
]
153153
},
154154
{
Binary file not shown.

dev/_downloads/bcd609cfe29c9da1f51c848e18b89c76/plot_partial_dependence.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,7 @@
270270

271271
print("Training interaction constraint HistGradientBoostingRegressor...")
272272
tic = time()
273-
est_no_interactions = HistGradientBoostingRegressor(
274-
interaction_cst=[[i] for i in range(X_train.shape[1])]
275-
)
273+
est_no_interactions = HistGradientBoostingRegressor(interaction_cst="no_interactions")
276274
est_no_interactions.fit(X_train, y_train)
277275
print(f"done in {time() - tic:.3f}s")
278276

dev/_downloads/df1b185d030fd32d53b4b2303d64816c/plot_release_highlights_1_2_0.ipynb

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,42 @@
5454
"from sklearn.datasets import load_diabetes\nfrom sklearn.ensemble import HistGradientBoostingRegressor\n\nX, y = load_diabetes(return_X_y=True, as_frame=True)\n\nhist_no_interact = HistGradientBoostingRegressor(\n interaction_cst=[[i] for i in range(X.shape[1])], random_state=0\n)\nhist_no_interact.fit(X, y)"
5555
]
5656
},
57+
{
58+
"cell_type": "markdown",
59+
"metadata": {},
60+
"source": [
61+
"## New and enhanced displays\n:class:`~metrics.PredictionErrorDisplay` provides a way to analyze regression\nmodels in a qualitative manner.\n\n"
62+
]
63+
},
64+
{
65+
"cell_type": "code",
66+
"execution_count": null,
67+
"metadata": {
68+
"collapsed": false
69+
},
70+
"outputs": [],
71+
"source": [
72+
"import matplotlib.pyplot as plt\nfrom sklearn.metrics import PredictionErrorDisplay\n\nfig, axs = plt.subplots(nrows=1, ncols=2, figsize=(12, 5))\n_ = PredictionErrorDisplay.from_estimator(\n hist_no_interact, X, y, kind=\"actual_vs_predicted\", ax=axs[0]\n)\n_ = PredictionErrorDisplay.from_estimator(\n hist_no_interact, X, y, kind=\"residual_vs_predicted\", ax=axs[1]\n)"
73+
]
74+
},
75+
{
76+
"cell_type": "markdown",
77+
"metadata": {},
78+
"source": [
79+
":class:`~model_selection.LearningCurveDisplay` is now available to plot\nresults from :func:`~model_selection.learning_curve`.\n\n"
80+
]
81+
},
82+
{
83+
"cell_type": "code",
84+
"execution_count": null,
85+
"metadata": {
86+
"collapsed": false
87+
},
88+
"outputs": [],
89+
"source": [
90+
"from sklearn.model_selection import LearningCurveDisplay\n\n_ = LearningCurveDisplay.from_estimator(\n hist_no_interact, X, y, cv=5, n_jobs=2, train_sizes=np.linspace(0.1, 1, 5)\n)"
91+
]
92+
},
5793
{
5894
"cell_type": "markdown",
5995
"metadata": {},
@@ -83,7 +119,7 @@
83119
"cell_type": "markdown",
84120
"metadata": {},
85121
"source": [
86-
"## Improved efficiency of many estimators\nIn version 1.1 the efficiency of many estimators relying on the computation of\npairwise distances was greatly improved for float64 dense input. In version 1.2,\nthe efficiency of these estimators was further improved for all combinations of\nfloat32/float64 and dense/sparse input (for all metrics except euclidean). It\nconcerns essentially clustering, manifold learning and neighbor search algorithms.\nA detailed list of the impacted estimators can be found in the\n`changelog <changes_1_2>`. The main benefits are a reduced memory footprint\nand a much better scalability on multi-core machines.\n\n"
122+
"## Improved efficiency of many estimators\nIn version 1.1 the efficiency of many estimators relying on the computation of\npairwise distances (essentially estimators related to clustering, manifold\nlearning and neighbors search algorithms) was greatly improved for float64\ndense input. Efficiency improvement especially were a reduced memory footprint\nand a much better scalability on multi-core machines.\nIn version 1.2, the efficiency of these estimators was further improved for all\ncombinations of dense and sparse inputs on float32 and float64 datasets, except\nthe sparse-dense and dense-sparse combinations for the Euclidean and Squared\nEuclidean Distance metrics.\nA detailed list of the impacted estimators can be found in the\n`changelog <changes_1_2>`.\n\n"
87123
]
88124
}
89125
],

dev/_downloads/scikit-learn-docs.zip

75 KB
Binary file not shown.
-186 Bytes
1 Byte
-212 Bytes

0 commit comments

Comments
 (0)