Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into from_pred
Browse files Browse the repository at this point in the history
  • Loading branch information
DeaMariaLeon committed Feb 14, 2025
2 parents 0a13cd0 + 2b97ac5 commit 3996689
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cuda-label-remover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
label-remover:
if: contains(github.event.pull_request.labels.*.name, 'CUDA CI')
name: Remove "CUDA CI" Label
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions-ecosystem/action-remove-labels@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler-title-regex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
jobs:

labeler:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
18 changes: 9 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- job: git_commit
displayName: Get Git Commit
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-24.04
steps:
- bash: python build_tools/azure/get_commit_message.py
name: commit
Expand All @@ -27,7 +27,7 @@ jobs:
)
displayName: Linting
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-24.04
steps:
- task: UsePythonVersion@0
inputs:
Expand All @@ -49,7 +49,7 @@ jobs:
- template: build_tools/azure/posix.yml
parameters:
name: Linux_Nightly
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
dependsOn: [git_commit, linting]
condition: |
and(
Expand Down Expand Up @@ -94,11 +94,11 @@ jobs:
vmImage: ubuntu-22.04
variables:
# Need to match Python version and Emscripten version for the correct
# Pyodide version. For example, for Pyodide version 0.25.1, see
# https://github.com/pyodide/pyodide/blob/0.25.1/Makefile.envs
PYODIDE_VERSION: '0.26.0'
# Pyodide version. For example, for Pyodide version 0.27.2, see
# https://github.com/pyodide/pyodide/blob/0.27.2/Makefile.envs
PYODIDE_VERSION: '0.27.2'
EMSCRIPTEN_VERSION: '3.1.58'
PYTHON_VERSION: '3.12.1'
PYTHON_VERSION: '3.12.7'

dependsOn: [git_commit, linting]
condition: |
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
- template: build_tools/azure/posix.yml
parameters:
name: Linux_Runs
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
dependsOn: [git_commit]
condition: |
and(
Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
- template: build_tools/azure/posix-docker.yml
parameters:
name: Linux_Docker
vmImage: ubuntu-20.04
vmImage: ubuntu-24.04
dependsOn: [linting, git_commit, Ubuntu_Jammy_Jellyfish]
# Runs when dependencies succeeded or skipped
condition: |
Expand Down
Binary file added bench_num_threads.parquet
Binary file not shown.
55 changes: 29 additions & 26 deletions build_tools/circle/doc_linux-64_conda.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/common_pitfalls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,10 @@ When we evaluate a randomized estimator performance by cross-validation, we
want to make sure that the estimator can yield accurate predictions for new
data, but we also want to make sure that the estimator is robust w.r.t. its
random initialization. For example, we would like the random weights
initialization of a :class:`~sklearn.linear_model.SGDClassifier` to be
initialization of an :class:`~sklearn.linear_model.SGDClassifier` to be
consistently good across all folds: otherwise, when we train that estimator
on new data, we might get unlucky and the random initialization may lead to
bad performance. Similarly, we want a random forest to be robust w.r.t the
bad performance. Similarly, we want a random forest to be robust w.r.t. the
set of randomly selected features that each tree will be using.

For these reasons, it is preferable to evaluate the cross-validation
Expand Down
4 changes: 4 additions & 0 deletions doc/modules/ensemble.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,10 @@ computationally expensive.
... .format(multi_layer_regressor.score(X_test, y_test)))
R2 score: 0.53

.. rubric:: Examples

* :ref:`sphx_glr_auto_examples_ensemble_plot_stack_predictors.py`

.. rubric:: References

.. [W1992] Wolpert, David H. "Stacked generalization." Neural networks 5.2
Expand Down
6 changes: 2 additions & 4 deletions examples/applications/plot_face_recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
===================================================
The dataset used in this example is a preprocessed excerpt of the
"Labeled Faces in the Wild", aka LFW_:
http://vis-www.cs.umass.edu/lfw/lfw-funneled.tgz (233MB)
.. _LFW: http://vis-www.cs.umass.edu/lfw/
"Labeled Faces in the Wild", aka LFW:
https://www.kaggle.com/datasets/jessicali9530/lfw-dataset
"""

Expand Down
3 changes: 3 additions & 0 deletions examples/inspection/plot_partial_dependence.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,11 @@
# However, it is worth noting that we are creating potential meaningless
# synthetic samples if features are correlated.
#
# .. _ice-vs-pdp:
#
# ICE vs. PDP
# ~~~~~~~~~~~
#
# PDP is an average of the marginal effects of the features. We are averaging the
# response of all samples of the provided set. Thus, some effects could be hidden. In
# this regard, it is possible to plot each individual response. This representation is
Expand Down
6 changes: 3 additions & 3 deletions sklearn/datasets/descr/lfw.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ The Labeled Faces in the Wild face recognition dataset
------------------------------------------------------

This dataset is a collection of JPEG pictures of famous people collected
over the internet, all details are available on the official website:
over the internet, and the details are available on the Kaggle website:

http://vis-www.cs.umass.edu/lfw/
https://www.kaggle.com/datasets/jessicali9530/lfw-dataset

Each picture is centered on a single face. The typical task is called
Face Verification: given a pair of two pictures, a binary classifier
Expand Down Expand Up @@ -114,7 +114,7 @@ Features real, between 0 and 255

* `Labeled Faces in the Wild: A Database for Studying Face Recognition
in Unconstrained Environments.
<http://vis-www.cs.umass.edu/lfw/lfw.pdf>`_
<https://people.cs.umass.edu/~elm/papers/lfw.pdf>`_
Gary B. Huang, Manu Ramesh, Tamara Berg, and Erik Learned-Miller.
University of Massachusetts, Amherst, Technical Report 07-49, October, 2007.

Expand Down
4 changes: 4 additions & 0 deletions sklearn/ensemble/_gb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,10 @@ class GradientBoostingClassifier(ClassifierMixin, BaseGradientBoosting):
There is a trade-off between learning_rate and n_estimators.
Values must be in the range `[0.0, inf)`.
For an example of the effects of this parameter and its interaction with
``subsample``, see
:ref:`sphx_glr_auto_examples_ensemble_plot_gradient_boosting_regularization.py`.
n_estimators : int, default=100
The number of boosting stages to perform. Gradient boosting
is fairly robust to over-fitting so a large number usually
Expand Down
11 changes: 8 additions & 3 deletions sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,8 @@ class HistGradientBoostingRegressor(RegressorMixin, BaseHistGradientBoosting):
converted to floating point numbers. This means that categorical values
of 1.0 and 1 are treated as the same category.
Read more in the :ref:`User Guide <categorical_support_gbdt>`.
Read more in the :ref:`User Guide <categorical_support_gbdt>` and
:ref:`sphx_glr_auto_examples_ensemble_plot_gradient_boosting_categorical.py`.
.. versionadded:: 0.24
Expand Down Expand Up @@ -1562,6 +1563,8 @@ class HistGradientBoostingRegressor(RegressorMixin, BaseHistGradientBoosting):
and specifies that each branch of a tree will either only split
on features 0 and 1 or only split on features 2, 3 and 4.
See :ref:`this example<ice-vs-pdp>` on how to use `interaction_cst`.
.. versionadded:: 1.2
warm_start : bool, default=False
Expand Down Expand Up @@ -1907,8 +1910,8 @@ class HistGradientBoostingClassifier(ClassifierMixin, BaseHistGradientBoosting):
.. versionchanged:: 1.4
Added `"from_dtype"` option.
.. versionchanged::1.6
The default will changed from `None` to `"from_dtype"`.
.. versionchanged:: 1.6
The default value changed from `None` to `"from_dtype"`.
monotonic_cst : array-like of int of shape (n_features) or dict, default=None
Monotonic constraint to enforce on each feature are specified using the
Expand Down Expand Up @@ -1949,6 +1952,8 @@ class HistGradientBoostingClassifier(ClassifierMixin, BaseHistGradientBoosting):
and specifies that each branch of a tree will either only split
on features 0 and 1 or only split on features 2, 3 and 4.
See :ref:`this example<ice-vs-pdp>` on how to use `interaction_cst`.
.. versionadded:: 1.2
warm_start : bool, default=False
Expand Down
4 changes: 3 additions & 1 deletion sklearn/inspection/_partial_dependence.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ def partial_dependence(
the average response of an estimator for each possible value of the
feature.
Read more in the :ref:`User Guide <partial_dependence>`.
Read more in
:ref:`sphx_glr_auto_examples_inspection_plot_partial_dependence.py`
and the :ref:`User Guide <partial_dependence>`.
.. warning::
Expand Down
4 changes: 3 additions & 1 deletion sklearn/inspection/_plot/partial_dependence.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ def from_estimator(
marks on the x-axes for one-way plots, and on both axes for two-way
plots.
Read more in the :ref:`User Guide <partial_dependence>`.
Read more in
:ref:`sphx_glr_auto_examples_inspection_plot_partial_dependence.py`
and the :ref:`User Guide <partial_dependence>`.
.. note::
Expand Down

0 comments on commit 3996689

Please sign in to comment.