Skip to content

Commit be902cc

Browse files
committed
Merge branch 'submodulev2' of https://github.com/neurodata/scikit-learn into submodulev2
2 parents fdf2e2d + a6a6b0e commit be902cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1037
-258
lines changed

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
| Version | Supported |
66
| --------- | ------------------ |
7-
| 1.2.2 | :white_check_mark: |
8-
| < 1.2.2 | :x: |
7+
| 1.3.0 | :white_check_mark: |
8+
| < 1.3.0 | :x: |
99

1010
## Reporting a Vulnerability
1111

build_tools/circle/doc_min_dependencies_environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies:
2323
- memory_profiler
2424
- compilers
2525
- sphinx=6.0.0 # min
26-
- sphinx-gallery=0.7.0 # min
26+
- sphinx-gallery=0.10.1 # min
2727
- sphinx-copybutton=0.5.2 # min
2828
- numpydoc=1.2.0 # min
2929
- sphinx-prompt=1.3.0 # min

build_tools/circle/doc_min_dependencies_linux-64_conda.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generated by conda-lock.
22
# platform: linux-64
3-
# input_hash: bd03405f744d4d5d0c59edd290d1e4245873b8593fcd3bbc3efdf8654a283161
3+
# input_hash: d465abb23248872aed411e2f2f7293a661f0b783f1a84420ffa5431229814cab
44
@EXPLICIT
55
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
66
https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2023.5.7-hbcca054_0.conda#f5c65075fc34438d5b456c7f3f5ab695
@@ -100,7 +100,7 @@ https://conda.anaconda.org/conda-forge/linux-64/markupsafe-2.1.3-py38h01eb140_0.
100100
https://conda.anaconda.org/conda-forge/noarch/networkx-3.1-pyhd8ed1ab_0.conda#254f787d5068bc89f578bf63893ce8b4
101101
https://conda.anaconda.org/conda-forge/noarch/packaging-23.1-pyhd8ed1ab_0.conda#91cda59e66e1e4afe9476f8ef98f5c30
102102
https://conda.anaconda.org/conda-forge/linux-64/pillow-9.4.0-py38hde6dc18_1.conda#3de5619d3f556f966189e5251a266125
103-
https://conda.anaconda.org/conda-forge/noarch/pluggy-1.0.0-pyhd8ed1ab_5.tar.bz2#7d301a0d25f424d96175f810935f0da9
103+
https://conda.anaconda.org/conda-forge/noarch/pluggy-1.2.0-pyhd8ed1ab_0.conda#7263924c642d22e311d9e59b839f1b33
104104
https://conda.anaconda.org/conda-forge/linux-64/psutil-5.9.5-py38h1de0b5d_0.conda#92e899e7b0ed27c793014d1fa54f9b7b
105105
https://conda.anaconda.org/conda-forge/noarch/py-1.11.0-pyh6c4a22f_0.tar.bz2#b4613d7e7a493916d867842a6a148054
106106
https://conda.anaconda.org/conda-forge/noarch/pygments-2.15.1-pyhd8ed1ab_0.conda#d316679235612869eba305aa7d41d9bf
@@ -138,15 +138,15 @@ https://conda.anaconda.org/conda-forge/noarch/memory_profiler-0.61.0-pyhd8ed1ab_
138138
https://conda.anaconda.org/conda-forge/noarch/partd-1.4.0-pyhd8ed1ab_0.conda#721dab5803ea92ce02ddc4ee50aa0c48
139139
https://conda.anaconda.org/conda-forge/noarch/pip-23.1.2-pyhd8ed1ab_0.conda#7288da0d36821349cf1126e8670292df
140140
https://conda.anaconda.org/conda-forge/noarch/plotly-5.14.0-pyhd8ed1ab_0.conda#6a7bcc42ef58dd6cf3da9333ea102433
141-
https://conda.anaconda.org/conda-forge/noarch/pytest-7.3.2-pyhd8ed1ab_1.conda#f2465696f4396245eca4613f6e924796
141+
https://conda.anaconda.org/conda-forge/noarch/pytest-7.4.0-pyhd8ed1ab_0.conda#3cfe9b9e958e7238a386933c75d190db
142142
https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.8.2-pyhd8ed1ab_0.tar.bz2#dd999d1cc9f79e67dbb855c8924c7984
143143
https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.6.3-hd8ed1ab_0.conda#3876f650ed7d0f95d70fa4b647621909
144144
https://conda.anaconda.org/conda-forge/noarch/urllib3-2.0.3-pyhd8ed1ab_0.conda#ae465d0fbf9f1979cb2d8d4043d885e2
145145
https://conda.anaconda.org/conda-forge/linux-64/gst-plugins-base-1.14.5-h0935bb2_2.tar.bz2#eb125ee86480e00a4a1ed45a577c3311
146146
https://conda.anaconda.org/conda-forge/noarch/importlib_metadata-6.7.0-hd8ed1ab_0.conda#27a4cec373ec84d1c1aa02a1e37f8eaf
147147
https://conda.anaconda.org/conda-forge/linux-64/liblapacke-3.8.0-20_mkl.tar.bz2#8274dc30518af9df1de47f5d9e73165c
148148
https://conda.anaconda.org/conda-forge/linux-64/numpy-1.17.3-py38h95a1406_0.tar.bz2#bc0cbf611fe2f86eab29b98e51404f5e
149-
https://conda.anaconda.org/conda-forge/noarch/platformdirs-3.6.0-pyhd8ed1ab_0.conda#741384b21c1b512617f4ee4ea8457c5d
149+
https://conda.anaconda.org/conda-forge/noarch/platformdirs-3.8.0-pyhd8ed1ab_0.conda#3e4aca765371893ad848397794600632
150150
https://conda.anaconda.org/conda-forge/noarch/pytest-forked-1.6.0-pyhd8ed1ab_0.conda#a46947638b6e005b63d2d6271da529b0
151151
https://conda.anaconda.org/conda-forge/noarch/requests-2.31.0-pyhd8ed1ab_0.conda#a30144e4156cdbb236f99ebb49828f8b
152152
https://conda.anaconda.org/conda-forge/linux-64/blas-2.20-mkl.tar.bz2#e7d09a07f5413e53dca5282b8fa50bed
@@ -167,7 +167,7 @@ https://conda.anaconda.org/conda-forge/linux-64/pyqt-5.12.3-py38ha8c2ead_3.tar.b
167167
https://conda.anaconda.org/conda-forge/linux-64/scikit-image-0.16.2-py38hb3f55d8_0.tar.bz2#468b398fefac8884cd6e6513af66549b
168168
https://conda.anaconda.org/conda-forge/noarch/seaborn-base-0.12.2-pyhd8ed1ab_0.conda#cf88f3a1c11536bc3c10c14ad00ccc42
169169
https://conda.anaconda.org/conda-forge/noarch/sphinx-copybutton-0.5.2-pyhd8ed1ab_0.conda#ac832cc43adc79118cf6e23f1f9b8995
170-
https://conda.anaconda.org/conda-forge/noarch/sphinx-gallery-0.7.0-py_0.tar.bz2#80bad3f857ecc86a4ab73f3e57addd13
170+
https://conda.anaconda.org/conda-forge/noarch/sphinx-gallery-0.10.1-pyhd8ed1ab_0.tar.bz2#4918585fe5e5341740f7e63c61743efb
171171
https://conda.anaconda.org/conda-forge/noarch/sphinx-prompt-1.3.0-py_0.tar.bz2#9363002e2a134a287af4e32ff0f26cdc
172172
https://conda.anaconda.org/conda-forge/linux-64/matplotlib-3.1.3-py38_0.tar.bz2#1992ab91bbff86ded8d99d1f488d8e8b
173173
https://conda.anaconda.org/conda-forge/linux-64/statsmodels-0.12.2-py38h5c078b8_0.tar.bz2#33787719ad03d33cffc4e2e3ea82bc9e

doc/conf.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,22 @@
6666
]
6767

6868
# Specify how to identify the prompt when copying code snippets
69-
copybutton_prompt_text = ">>> "
69+
copybutton_prompt_text = r">>> |\.\.\. "
70+
copybutton_prompt_is_regexp = True
7071

7172
try:
7273
import jupyterlite_sphinx # noqa: F401
7374

7475
extensions.append("jupyterlite_sphinx")
76+
with_jupyterlite = True
7577
except ImportError:
7678
# In some cases we don't want to require jupyterlite_sphinx to be installed,
7779
# e.g. the doc-min-dependencies build
7880
warnings.warn(
7981
"jupyterlite_sphinx is not installed, you need to install it "
8082
"if you want JupyterLite links to appear in each example"
8183
)
84+
with_jupyterlite = False
8285

8386
# Produce `plot::` directives for examples that contain `import matplotlib` or
8487
# `from matplotlib import`.
@@ -526,13 +529,16 @@ def reset_sklearn_config(gallery_conf, fname):
526529
"dependencies": "./binder/requirements.txt",
527530
"use_jupyter_lab": True,
528531
},
529-
"jupyterlite": {"notebook_modification_function": notebook_modification_function},
530532
# avoid generating too many cross links
531533
"inspect_global_variables": False,
532534
"remove_config_comments": True,
533535
"plot_gallery": "True",
534536
"reset_modules": ("matplotlib", "seaborn", reset_sklearn_config),
535537
}
538+
if with_jupyterlite:
539+
sphinx_gallery_conf["jupyterlite"] = {
540+
"notebook_modification_function": notebook_modification_function
541+
}
536542

537543

538544
# The following dictionary contains the information used to create the

doc/developers/advanced_installation.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ feature, code or documentation improvement).
9090

9191
.. prompt:: bash $
9292

93-
pip install --verbose --no-use-pep517 --no-build-isolation --editable .
93+
pip install -v --no-use-pep517 --no-build-isolation -e .
9494

9595
#. Check that the installed scikit-learn has a version number ending with
9696
`.dev0`:
@@ -109,7 +109,9 @@ feature, code or documentation improvement).
109109
(ending in `.pyx` or `.pxd`). This can happen when you edit them or when you
110110
use certain git commands such as `git pull`. Use the ``--no-build-isolation`` flag
111111
to avoid compiling the whole project each time, only the files you have
112-
modified.
112+
modified. Include the ``--no-use-pep517`` flag because the ``--no-build-isolation``
113+
option might not work otherwise (this is due to a bug which will be fixed in the
114+
future).
113115

114116
Dependencies
115117
------------
@@ -242,7 +244,7 @@ Finally, build scikit-learn from this command prompt:
242244

243245
.. prompt:: bash $
244246

245-
pip install --verbose --no-use-pep517 --no-build-isolation --editable .
247+
pip install -v --no-use-pep517 --no-build-isolation -e .
246248

247249
.. _compiler_macos:
248250

@@ -284,7 +286,7 @@ scikit-learn from source:
284286
joblib threadpoolctl pytest compilers llvm-openmp
285287
conda activate sklearn-dev
286288
make clean
287-
pip install --verbose --no-use-pep517 --no-build-isolation --editable .
289+
pip install -v --no-use-pep517 --no-build-isolation -e .
288290

289291
.. note::
290292

@@ -364,7 +366,7 @@ Finally, build scikit-learn in verbose mode (to check for the presence of the
364366
.. prompt:: bash $
365367

366368
make clean
367-
pip install --verbose --no-use-pep517 --no-build-isolation --editable .
369+
pip install -v --no-use-pep517 --no-build-isolation -e .
368370

369371
.. _compiler_linux:
370372

@@ -424,7 +426,7 @@ in the user folder using conda:
424426
conda create -n sklearn-dev -c conda-forge python numpy scipy cython \
425427
joblib threadpoolctl pytest compilers
426428
conda activate sklearn-dev
427-
pip install --verbose --no-use-pep517 --no-build-isolation --editable .
429+
pip install -v --no-use-pep517 --no-build-isolation -e .
428430

429431
.. _compiler_freebsd:
430432

@@ -453,7 +455,7 @@ Finally, build the package using the standard command:
453455

454456
.. prompt:: bash $
455457

456-
pip install --verbose --no-use-pep517 --no-build-isolation --editable .
458+
pip install -v --no-use-pep517 --no-build-isolation -e .
457459

458460
For the upcoming FreeBSD 12.1 and 11.3 versions, OpenMP will be included in
459461
the base system and these steps will not be necessary.
@@ -514,7 +516,7 @@ and environment variable as follows before calling the ``pip install`` or
514516
``python setup.py build_ext`` commands::
515517

516518
export SKLEARN_BUILD_PARALLEL=3
517-
pip install --verbose --no-use-pep517 --no-build-isolation --editable .
519+
pip install -v --no-use-pep517 --no-build-isolation -e .
518520

519521
On a machine with 2 CPU cores, it can be beneficial to use a parallelism level
520522
of 3 to overlap IO bound tasks (reading and writing files on disk) with CPU

doc/developers/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ Building the documentation requires installing some additional packages:
920920

921921
pip install sphinx sphinx-gallery numpydoc matplotlib Pillow pandas \
922922
scikit-image packaging seaborn sphinx-prompt \
923-
sphinxext-opengraph plotly pooch
923+
sphinxext-opengraph sphinx-copybutton plotly pooch
924924

925925
To build the documentation, you need to be in the ``doc`` folder:
926926

doc/templates/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ <h4 class="sk-landing-call-header">News</h4>
169169
<li><strong>On-going development:</strong>
170170
<a href="https://scikit-learn.org/dev/whats_new.html"><strong>What's new</strong> (Changelog)</a>
171171
</li>
172+
<li><strong>June 2023.</strong> scikit-learn 1.3.0 is available for download (<a href="whats_new/v1.3.html#version-1-3-0">Changelog</a>).
173+
</li>
172174
<li><strong>March 2023.</strong> scikit-learn 1.2.2 is available for download (<a href="whats_new/v1.2.html#version-1-2-2">Changelog</a>).
173175
</li>
174176
<li><strong>January 2023.</strong> scikit-learn 1.2.1 is available for download (<a href="whats_new/v1.2.html#version-1-2-1">Changelog</a>).

doc/themes/scikit-learn-modern/static/css/theme.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,13 +1019,12 @@ div.sphx-glr-thumbcontainer {
10191019
padding: 0;
10201020
}
10211021

1022-
10231022
@media screen and (min-width: 1540px) {
1024-
.sphx-glr-download-link-note {
1025-
position: absolute;
1023+
div.sphx-glr-download-link-note.admonition.note {
10261024
position: absolute;
10271025
left: 98%;
10281026
width: 20ex;
1027+
margin-top: calc(max(5.75rem, 1vh));
10291028
}
10301029
}
10311030

doc/whats_new/v1.3.rst

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
Version 1.3.0
88
=============
99

10-
**In Development**
10+
**June 2023**
11+
12+
For a short description of the main highlights of the release, please refer to
13+
:ref:`sphx_glr_auto_examples_release_highlights_plot_release_highlights_1_3_0.py`.
1114

1215
.. include:: changelog_legend.inc
1316

@@ -231,6 +234,11 @@ Changelog
231234
:user:`Jérémie du Boisberranger <jeremiedbb>`,
232235
:user:`Guillaume Lemaitre <glemaitre>`.
233236

237+
- |Fix| :class:`cluster.KMeans`, :class:`cluster.MiniBatchKMeans` and
238+
:func:`cluster.k_means` now correctly handle the combination of `n_init="auto"`
239+
and `init` being an array-like, running one initialization in that case.
240+
:pr:`26657` by :user:`Binesh Bannerjee <bnsh>`.
241+
234242
- |API| The `sample_weight` parameter in `predict` for
235243
:meth:`cluster.KMeans.predict` and :meth:`cluster.MiniBatchKMeans.predict`
236244
is now deprecated and will be removed in v1.5.
@@ -455,6 +463,11 @@ Changelog
455463
on linearly separable problems.
456464
:pr:`25214` by `Tom Dupre la Tour`_.
457465

466+
- |Fix| Fix a crash when calling `fit` on
467+
:class:`linear_model.LogisticRegression(solver="newton-cholesky", max_iter=0)`
468+
which failed to inspect the state of the model prior to the first parameter update.
469+
:pr:`26653` by :user:`Olivier Grisel <ogrisel>`.
470+
458471
- |API| Deprecates `n_iter` in favor of `max_iter` in
459472
:class:`linear_model.BayesianRidge` and :class:`linear_model.ARDRegression`.
460473
`n_iter` will be removed in scikit-learn 1.5. This change makes those
@@ -760,4 +773,40 @@ Code and Documentation Contributors
760773
Thanks to everyone who has contributed to the maintenance and improvement of
761774
the project since version 1.2, including:
762775

763-
TODO: update at the time of the release.
776+
2357juan, Abhishek Singh Kushwah, Adam Handke, Adam Kania, Adam Li, adienes,
777+
Admir Demiraj, adoublet, Adrin Jalali, A.H.Mansouri, Ahmedbgh, Ala-Na, Alex
778+
Buzenet, AlexL, Ali H. El-Kassas, amay, András Simon, André Pedersen, Andrew
779+
Wang, Ankur Singh, annegnx, Ansam Zedan, Anthony22-dev, Artur Hermano, Arturo
780+
Amor, as-90, ashah002, Ashish Dutt, Ashwin Mathur, AymericBasset, Azaria
781+
Gebremichael, Barata Tripramudya Onggo, Benedek Harsanyi, Benjamin Bossan,
782+
Bharat Raghunathan, Binesh Bannerjee, Boris Feld, Brendan Lu, Brevin Kunde,
783+
cache-missing, Camille Troillard, Carla J, carlo, Carlo Lemos, c-git, Changyao
784+
Chen, Chiara Marmo, Christian Lorentzen, Christian Veenhuis, Christine P. Chai,
785+
crispinlogan, Da-Lan, DanGonite57, Dave Berenbaum, davidblnc, david-cortes,
786+
Dayne, Dea María Léon, Denis, Dimitri Papadopoulos Orfanos, Dimitris
787+
Litsidis, Dmitry Nesterov, Dominic Fox, Dominik Prodinger, Edern, Ekaterina
788+
Butyugina, Elabonga Atuo, Emir, farhan khan, Felipe Siola, futurewarning, Gael
789+
Varoquaux, genvalen, Gleb Levitski, Guillaume Lemaitre, gunesbayir, Haesun
790+
Park, hujiahong726, i-aki-y, Ian Thompson, Ido M, Ily, Irene, Jack McIvor,
791+
jakirkham, James Dean, JanFidor, Jarrod Millman, JB Mountford, Jérémie du
792+
Boisberranger, Jessicakk0711, Jiawei Zhang, Joey Ortiz, JohnathanPi, John
793+
Pangas, Joshua Choo Yun Keat, Joshua Hedlund, JuliaSchoepp, Julien Jerphanion,
794+
jygerardy, ka00ri, Kaushik Amar Das, Kento Nozawa, Kian Eliasi, Kilian Kluge,
795+
Lene Preuss, Linus, Logan Thomas, Loic Esteve, Louis Fouquet, Lucy Liu, Madhura
796+
Jayaratne, Marc Torrellas Socastro, Maren Westermann, Mario Kostelac, Mark
797+
Harfouche, Marko Toplak, Marvin Krawutschke, Masanori Kanazu, mathurinm, Matt
798+
Haberland, Max Halford, maximeSaur, Maxwell Liu, m. bou, mdarii, Meekail Zain,
799+
Mikhail Iljin, murezzda, Nawazish Alam, Nicola Fanelli, Nightwalkx, Nikolay
800+
Petrov, Nishu Choudhary, NNLNR, npache, Olivier Grisel, Omar Salman, ouss1508,
801+
PAB, Pandata, partev, Peter Piontek, Phil, pnucci, Pooja M, Pooja Subramaniam,
802+
precondition, Quentin Barthélemy, Rafal Wojdyla, Raghuveer Bhat, Rahil Parikh,
803+
Ralf Gommers, ram vikram singh, Rushil Desai, Sadra Barikbin, SANJAI_3, Sashka
804+
Warner, Scott Gigante, Scott Gustafson, searchforpassion, Seoeun
805+
Hong, Shady el Gewily, Shiva chauhan, Shogo Hida, Shreesha Kumar Bhat, sonnivs,
806+
Sortofamudkip, Stanislav (Stanley) Modrak, Stefanie Senger, Steven Van
807+
Vaerenbergh, Tabea Kossen, Théophile Baranger, Thijs van Weezel, Thomas A
808+
Caswell, Thomas Germer, Thomas J. Fan, Tim Head, Tim P, Tom Dupré la Tour,
809+
tomiock, tspeng, Valentin Laurent, Veghit, VIGNESH D, Vijeth Moudgalya, Vinayak
810+
Mehta, Vincent M, Vincent-violet, Vyom Pathak, William M, windiana42, Xiao
811+
Yuan, Yao Xiao, Yaroslav Halchenko, Yotam Avidar-Constantini, Yuchen Zhou,
812+
Yusuf Raji, zeeshan lone

doc/whats_new/v1.4.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,13 @@ TODO: update at the time of the release.
5858
:meth:`base.OutlierMixin.fit_predict` now accept ``**kwargs`` which are
5959
passed to the ``fit`` method of the the estimator. :pr:`26506` by `Adrin
6060
Jalali`_.
61+
62+
:mod:`sklearn.decomposition`
63+
............................
64+
65+
- |Enhancement| An "auto" option was added to the `n_components` parameter of
66+
:func:`decomposition.non_negative_factorization`, :class:`decomposition.NMF` and
67+
:class:`decomposition.MiniBatchNMF` to automatically infer the number of components from W or H shapes
68+
when using a custom initialization. The default value of this parameter will change
69+
from `None` to `auto` in version 1.6.
70+
:pr:`26634` by :user:`Alexandre Landeau <AlexL>` and :user:`Alexandre Vigny <avigny>`.

0 commit comments

Comments
 (0)