Version 1.6#

For a short description of the main highlights of the release, please refer to Release Highlights for scikit-learn 1.6.

Legend for changelogs

  • Major Feature something big that you couldn’t do before.

  • Feature something that you couldn’t do before.

  • Efficiency an existing feature now may not require as much computation or memory.

  • Enhancement a miscellaneous minor improvement.

  • Fix something that previously didn’t work as documented – or according to reasonable expectationsshould now work.

  • API Change you will need to change your code to have the same effect in the future; or a feature will be removed in the future.

Version 1.6.1#

January 2025

Changed models#

  • Fix The tags.input_tags.sparse flag was corrected for a majority of estimators. By Antoine Baker #30187

Changes impacting many modules#

sklearn.metrics#

  • Fix Fix regression when scikit-learn metric called on PyTorch CPU tensors would raise an error (with array API dispatch disabled which is the default). By Loïc Estève #30454

sklearn.model_selection#

sklearn.tree#

  • Fix Use log2 instead of ln for building trees to maintain behavior of previous versions. By Thomas Fan #30557

sklearn.utils#

  • Enhancement utils.estimator_checks.check_estimator_sparse_tag ensures that the estimator tag input_tags.sparse is consistent with its fit method (accepting sparse input X or raising the appropriate error). By Antoine Baker #30187

  • Fix Raise a DeprecationWarning when there is no concrete implementation of __sklearn_tags__ in the MRO of the estimator. We request to inherit from BaseEstimator that implements __sklearn_tags__. By Guillaume Lemaitre #30516

Version 1.6.0#

December 2024

Changes impacting many modules#

support for Array API#

Additional estimators and functions have been updated to include support for all Array API compliant inputs.

see Array API support (experimental) for more details.

Metadata routing#

Refer to the Metadata Routing User Guide for more details.

Dropping official support for PyPy#

Due to limited maintainer resources and small number of users, official PyPy support has been dropped. some parts of scikit-learn may still work but PyPy is not tested anymore in the scikit-learn Continuous Integration. By Loïc Estève #29128

Dropping support for building with setuptools#

From scikit-learn 1.6 onwards, support for building with setuptools has been removed. Meson is the only supported way to build scikit-learn, see Building from source for more details. By Loïc Estève #29400

Free-threaded CPython 3.13 support#

scikit-learn has preliminary support for free-threaded CPython, in particular free-threaded wheels are available for all of our supported platforms.

Free-threaded (also known as nogil) CPython 3.13 is an experimental version of CPython 3.13 who aims at enabling efficient multi-threaded use cases by removing the Global Interpreter Lock (GIL).

For more details about free-threaded CPython see py-free-threading doc, in particular how to install a free-threaded CPython and Ecosystem compatibility tracking.

Feel free to try free-threaded on your use case and report any issues!

By Loïc Estève and many other people in the wider scientific Python and CPython ecosystem, for example Nathan Goldbaum, Ralf Gommers, Edgar Andrés Margffoy Tuay. #30360

sklearn.base#

sklearn.calibration#

sklearn.cluster#

  • API Change The copy parameter of cluster.Birch was deprecated in 1.6 and will be removed in 1.8. It has no effect as the estimator does not perform in-place operations on the input data. By Yao Xiao #29124

sklearn.compose#

sklearn.covariance#

sklearn.cross_decomposition#

sklearn.datasets#

  • Feature datasets.fetch_file allows downloading arbitrary data-file from the web. It handles local caching, integrity checks with sHA256 digests and automatic retries in case of HTTP errors. By Olivier Grisel #29354

sklearn.decomposition#

sklearn.discriminant_analysis#

sklearn.ensemble#

sklearn.feature_extraction#

sklearn.frozen#

  • Major Feature FrozenEstimator is now introduced which allows freezing an estimator. This means calling .fit on it has no effect, and doing a clone(frozenestimator) returns the same estimator instead of an unfitted clone. #29705 By Adrin Jalali #29705

sklearn.impute#

sklearn.linear_model#

sklearn.manifold#

sklearn.metrics#

sklearn.model_selection#

sklearn.neighbors#

sklearn.neural_network#

sklearn.pipeline#

  • Major Feature pipeline.Pipeline can now transform metadata up to the step requiring the metadata, which can be set using the transform_input parameter. By Adrin Jalali #28901

  • Enhancement pipeline.Pipeline now warns about not being fitted before calling methods that require the pipeline to be fitted. This warning will become an error in 1.8. By Adrin Jalali #29868

  • Fix Fixed an issue with tags and estimator type of Pipeline when pipeline is empty. This allows the HTML representation of an empty pipeline to be rendered correctly. By Gennaro Daniele Acciaro #30203

sklearn.preprocessing#

sklearn.semi_supervised#

sklearn.tree#

sklearn.utils#

Code and documentation contributors

Thanks to everyone who has contributed to the maintenance and improvement of the project since version 1.5, including:

Aaron schumacher, Abdulaziz Aloqeely, abhi-jha, Acciaro Gennaro Daniele, Adam J. stewart, Adam Li, Adeel Hassan, Adeyemi Biola, Aditi Juneja, Adrin Jalali, Aisha, Akanksha Mhadolkar, Akihiro Kuno, Alberto Torres, alexqiao, Alihan Zihna, Aniruddha saha, antoinebaker, Antony Lee, Anurag Varma, Arif Qodari, Arthur Courselle, ArthurDbrn, Arturo Amor, Aswathavicky, Audrey Flanders, aurelienmorgan, Austin, awwwyan, AyGeeEm, a.zy.lee, baggiponte, Blazestorm001, bme-git, Boney Patel, brdav, Brigitta sipőcz, Cailean Carter, Camille Troillard, Carlo Lemos, Christian Lorentzen, Christian Veenhuis, Christine P. Chai, claudio, Conrad stevens, datarollhexasphericon, Davide Chicco, David Matthew Cherney, Dea María Léon, Deepak saldanha, Deepyaman Datta, dependabot[bot], dinga92, Dmitry Kobak, Domenico, Drew Craeton, dymil, Edoardo Abati, EmilyXinyi, Eric Larson, Evelyn, fabianhenning, Farid “Freddie” Taba, Gael Varoquaux, Giorgio Angelotti, Gleb Levitski, Guillaume Lemaitre, Guntitat sawadwuthikul, Haesun Park, Hanjun Kim, Henrique Caroço, hhchen1105, Hugo Boulenger, Ilya Komarov, Inessa Pawson, Ivan Pan, Ivan Wiryadi, Jaimin Chauhan, Jakob Bull, James Lamb, Janez Demšar, Jérémie du Boisberranger, Jérôme Dockès, Jirair Aroyan, João Morais, Joe Cainey, Joel Nothman, John Enblom, JorgeCardenas, Joseph Barbier, jpienaar-tuks, Julian Chan, K.Bharat Reddy, Kevin Doshi, Lars, Loic Esteve, Lucas Colley, Lucy Liu, lunovian, Marc Bresson, Marco Edward Gorelli, Marco Maggi, Marco Wolsza, Maren Westermann, Maries-WiMLDs, Martin Helm, Mathew shen, mathurinm, Matthew Feickert, Maxwell Liu, Meekail Zain, Michael Dawson, Miguel Cárdenas, m-maggi, mrastgoo, Natalia Mokeeva, Nathan Goldbaum, Nathan Orgera, nbrown-scottLogic, Nikita Chistyakov, Nithish Bolleddula, Noam Keidar, NoPenguinsLand, Norbert Preining, notPlancha, Olivier Grisel, Omar salman, ParsifalXu, Piotr, Priyank shroff, Priyansh Gupta, Quentin Barthélemy, Rachit23110261, Rahil Parikh, raisadz, Rajath, renaissance0ne, Reshama shaikh, Roberto Rosati, Robert Pollak, rwelsch427, santiago Castro, santiago M. Mola, scikit-learn-bot, sean moiselle, sHREEKANT VITTHAL NANDIYAWAR, shruti Nath, søren Bredlund Caspersen, stefanie senger, stefano Gaspari, steffen schneider, Štěpán sršeň, sylvain Combettes, Tamara, Thomas, Thomas Gessey-Jones, Thomas J. Fan, Thomas Li, ThorbenMaa, Tialo, Tim Head, Tuhin sharma, Tushar Parimi, Umberto Fasci, UV, vedpawar2254, Velislav Babatchev, Victoria shevchenko, viktor765, Vince Carey, Virgil Chan, Wang Jiayi, Xiao Yuan, Xuefeng Xu, Yao Xiao, yareyaredesuyo, Zachary Vealey, Ziad Amerr