Skip to content

Commit f7478c4

Browse files
committed
Pushing the docs to dev/ for branch: main, commit 102663d6147e552a4e04dda66127e82d6f7e6e25
1 parent 52e52b0 commit f7478c4

File tree

1,600 files changed

+6118
-8235
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,600 files changed

+6118
-8235
lines changed

Diff for: dev/.buildinfo

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 2478929b8f68b6599631942f204e49da
3+
config: d926c2f4528fe6bc7527c4e7380cc80a
44
tags: 645f666f9bcd5a90fca523b33c5a78b7
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.

Diff for: dev/_downloads/133f2198d3ab792c75b39a63b0a99872/plot_cost_sensitive_learning.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@
635635
"cell_type": "markdown",
636636
"metadata": {},
637637
"source": [
638-
"We observe that tuning the decision threshold increases the expected profit\nwhen deploying our model - as indicated by the business metric. It is therefore\nvaluable, whenever possible, to optimize the decision threshold with respect\nto the business metric.\n\n### Manually setting the decision threshold instead of tuning it\n\nIn the previous example, we used the\n:class:`~sklearn.model_selection.TunedThresholdClassifierCV` to find the optimal\ndecision threshold. However, in some cases, we might have some prior knowledge about\nthe problem at hand and we might be happy to set the decision threshold manually.\n\nThe class :class:`~sklearn.model_selection.FixedThresholdClassifier` allows us to\nmanually set the decision threshold. At prediction time, it behave as the previous\ntuned model but no search is performed during the fitting process.\n\nHere, we will reuse the decision threshold found in the previous section to create a\nnew model and check that it gives the same results.\n\n"
638+
"We observe that tuning the decision threshold increases the expected profit\nwhen deploying our model - as indicated by the business metric. It is therefore\nvaluable, whenever possible, to optimize the decision threshold with respect\nto the business metric.\n\n### Manually setting the decision threshold instead of tuning it\n\nIn the previous example, we used the\n:class:`~sklearn.model_selection.TunedThresholdClassifierCV` to find the optimal\ndecision threshold. However, in some cases, we might have some prior knowledge about\nthe problem at hand and we might be happy to set the decision threshold manually.\n\nThe class :class:`~sklearn.model_selection.FixedThresholdClassifier` allows us to\nmanually set the decision threshold. At prediction time, it behave as the previous\ntuned model but no search is performed during the fitting process. Note that here\nwe use :class:`~sklearn.frozen.FrozenEstimator` to wrap the predictive model to\navoid any refitting.\n\nHere, we will reuse the decision threshold found in the previous section to create a\nnew model and check that it gives the same results.\n\n"
639639
]
640640
},
641641
{
@@ -646,7 +646,7 @@
646646
},
647647
"outputs": [],
648648
"source": [
649-
"from sklearn.model_selection import FixedThresholdClassifier\n\nmodel_fixed_threshold = FixedThresholdClassifier(\n estimator=model, threshold=tuned_model.best_threshold_, prefit=True\n).fit(data_train, target_train)"
649+
"from sklearn.frozen import FrozenEstimator\nfrom sklearn.model_selection import FixedThresholdClassifier\n\nmodel_fixed_threshold = FixedThresholdClassifier(\n estimator=FrozenEstimator(model), threshold=tuned_model.best_threshold_\n)"
650650
]
651651
},
652652
{
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.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 Bytes
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.
0 Bytes
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.
0 Bytes
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.
0 Bytes
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.
0 Bytes
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.
0 Bytes
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.

Diff for: dev/_downloads/9ca7cbe47e4cace7242fe4c5c43dfa52/plot_cost_sensitive_learning.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -660,15 +660,18 @@ def business_metric(y_true, y_pred, amount):
660660
#
661661
# The class :class:`~sklearn.model_selection.FixedThresholdClassifier` allows us to
662662
# manually set the decision threshold. At prediction time, it behave as the previous
663-
# tuned model but no search is performed during the fitting process.
663+
# tuned model but no search is performed during the fitting process. Note that here
664+
# we use :class:`~sklearn.frozen.FrozenEstimator` to wrap the predictive model to
665+
# avoid any refitting.
664666
#
665667
# Here, we will reuse the decision threshold found in the previous section to create a
666668
# new model and check that it gives the same results.
669+
from sklearn.frozen import FrozenEstimator
667670
from sklearn.model_selection import FixedThresholdClassifier
668671

669672
model_fixed_threshold = FixedThresholdClassifier(
670-
estimator=model, threshold=tuned_model.best_threshold_, prefit=True
671-
).fit(data_train, target_train)
673+
estimator=FrozenEstimator(model), threshold=tuned_model.best_threshold_
674+
)
672675

673676
# %%
674677
business_score = business_scorer(
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.
0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 Bytes
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.
0 Bytes
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.
0 Bytes
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.
0 Bytes
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.

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

-23.5 KB
Binary file not shown.
209 Bytes
180 Bytes
234 Bytes
231 Bytes
90 Bytes

Diff for: dev/_images/sphx_glr_plot_anomaly_comparison_001.png

367 Bytes
1 Byte
2.32 KB
1012 Bytes

Diff for: dev/_images/sphx_glr_plot_cluster_comparison_001.png

-520 Bytes
27 Bytes

Diff for: dev/_images/sphx_glr_plot_coin_segmentation_001.png

49 Bytes

0 commit comments

Comments
 (0)