Skip to content

Commit a7253dd

Browse files
committed
Pushing the docs to dev/ for branch: main, commit efe2b766b6be66a81b69df1e6273a75c21eed088
1 parent ca2e299 commit a7253dd

File tree

1,526 files changed

+6029
-5973
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,526 files changed

+6029
-5973
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

dev/_downloads/133f2198d3ab792c75b39a63b0a99872/plot_cost_sensitive_learning.ipynb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,17 @@
666666
"source": [
667667
"We observe that we obtained the exact same results but the fitting process\nwas much faster since we did not perform any hyper-parameter search.\n\nFinally, the estimate of the (average) business metric itself can be unreliable, in\nparticular when the number of data points in the minority class is very small.\nAny business impact estimated by cross-validation of a business metric on\nhistorical data (offline evaluation) should ideally be confirmed by A/B testing\non live data (online evaluation). Note however that A/B testing models is\nbeyond the scope of the scikit-learn library itself.\n\n"
668668
]
669+
},
670+
{
671+
"cell_type": "code",
672+
"execution_count": null,
673+
"metadata": {
674+
"collapsed": false
675+
},
676+
"outputs": [],
677+
"source": [
678+
"# At the end, we disable the configuration flag for metadata routing::\nsklearn.set_config(enable_metadata_routing=False)"
679+
]
669680
}
670681
],
671682
"metadata": {
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

dev/_downloads/862c762bdafef83db4c2c9e803ed6295/plot_release_highlights_1_6_0.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"cell_type": "markdown",
3737
"metadata": {},
3838
"source": [
39-
"## Transforming data other than X in a Pipeline\n\nThe :class:`~pipeline.Pipeline` now supports transforming passed data other than `X`\nif necessary. This can be done by setting the new `transform_input` parameter. This\nis particularly useful when passing a validation set through the pipeline.\n\nAs an example, imagine `EstimatorWithValidationSet` is an estimator which accepts\na validation set. We can now have a pipeline which will transform the validation set\nand pass it to the estimator::\n\n sklearn.set_config(enable_metadata_routing=True)\n est_gs = GridSearchCV(\n Pipeline(\n (\n StandardScaler(),\n EstimatorWithValidationSet(...).set_fit_request(X_val=True, y_val=True),\n ),\n # telling pipeline to transform these inputs up to the step which is\n # requesting them.\n transform_input=[\"X_val\"],\n ),\n param_grid={\"estimatorwithvalidationset__param_to_optimize\": list(range(5))},\n cv=5,\n ).fit(X, y, X_val=X_val, y_val=y_val)\n\nIn the above code, the key parts are the call to `set_fit_request` to specify that\n`X_val` and `y_val` are required by the `EstimatorWithValidationSet.fit` method, and\nthe `transform_input` parameter to tell the pipeline to transform `X_val` before\npassing it to `EstimatorWithValidationSet.fit`.\n\nNote that at this time scikit-learn estimators have not yet been extended to accept\nuser specified validation sets. This feature is released early to collect feedback\nfrom third-party libraries who might benefit from it.\n\n"
39+
"## Transforming data other than X in a Pipeline\n\nThe :class:`~pipeline.Pipeline` now supports transforming passed data other than `X`\nif necessary. This can be done by setting the new `transform_input` parameter. This\nis particularly useful when passing a validation set through the pipeline.\n\nAs an example, imagine `EstimatorWithValidationSet` is an estimator which accepts\na validation set. We can now have a pipeline which will transform the validation set\nand pass it to the estimator::\n\n with sklearn.config_context(enable_metadata_routing=True):\n est_gs = GridSearchCV(\n Pipeline(\n (\n StandardScaler(),\n EstimatorWithValidationSet(...).set_fit_request(X_val=True, y_val=True),\n ),\n # telling pipeline to transform these inputs up to the step which is\n # requesting them.\n transform_input=[\"X_val\"],\n ),\n param_grid={\"estimatorwithvalidationset__param_to_optimize\": list(range(5))},\n cv=5,\n ).fit(X, y, X_val=X_val, y_val=y_val)\n\nIn the above code, the key parts are the call to `set_fit_request` to specify that\n`X_val` and `y_val` are required by the `EstimatorWithValidationSet.fit` method, and\nthe `transform_input` parameter to tell the pipeline to transform `X_val` before\npassing it to `EstimatorWithValidationSet.fit`.\n\nNote that at this time scikit-learn estimators have not yet been extended to accept\nuser specified validation sets. This feature is released early to collect feedback\nfrom third-party libraries who might benefit from it.\n\n"
4040
]
4141
},
4242
{
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

dev/_downloads/9ca7cbe47e4cace7242fe4c5c43dfa52/plot_cost_sensitive_learning.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,3 +689,6 @@ def business_metric(y_true, y_pred, amount):
689689
# historical data (offline evaluation) should ideally be confirmed by A/B testing
690690
# on live data (online evaluation). Note however that A/B testing models is
691691
# beyond the scope of the scikit-learn library itself.
692+
693+
# At the end, we disable the configuration flag for metadata routing::
694+
sklearn.set_config(enable_metadata_routing=False)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

dev/_downloads/a471e25495d24d0086e798aa9ca44a89/plot_release_highlights_1_6_0.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,20 @@
6969
# a validation set. We can now have a pipeline which will transform the validation set
7070
# and pass it to the estimator::
7171
#
72-
# sklearn.set_config(enable_metadata_routing=True)
73-
# est_gs = GridSearchCV(
74-
# Pipeline(
75-
# (
76-
# StandardScaler(),
77-
# EstimatorWithValidationSet(...).set_fit_request(X_val=True, y_val=True),
72+
# with sklearn.config_context(enable_metadata_routing=True):
73+
# est_gs = GridSearchCV(
74+
# Pipeline(
75+
# (
76+
# StandardScaler(),
77+
# EstimatorWithValidationSet(...).set_fit_request(X_val=True, y_val=True),
78+
# ),
79+
# # telling pipeline to transform these inputs up to the step which is
80+
# # requesting them.
81+
# transform_input=["X_val"],
7882
# ),
79-
# # telling pipeline to transform these inputs up to the step which is
80-
# # requesting them.
81-
# transform_input=["X_val"],
82-
# ),
83-
# param_grid={"estimatorwithvalidationset__param_to_optimize": list(range(5))},
84-
# cv=5,
85-
# ).fit(X, y, X_val=X_val, y_val=y_val)
83+
# param_grid={"estimatorwithvalidationset__param_to_optimize": list(range(5))},
84+
# cv=5,
85+
# ).fit(X, y, X_val=X_val, y_val=y_val)
8686
#
8787
# In the above code, the key parts are the call to `set_fit_request` to specify that
8888
# `X_val` and `y_val` are required by the `EstimatorWithValidationSet.fit` method, and
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

dev/_downloads/scikit-learn-docs.zip

3.72 KB
Binary file not shown.
-114 Bytes

0 commit comments

Comments
 (0)