Version 1.9#

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

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 expectations – should 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.9.1#

September 2026

Support for Array API#

  • Fix Fixed classification metrics to accept pandas labels when array API dispatch is enabled and predictions are from a different array API namespace or device. By Olivier Grisel. #34779

Metadata routing#

Refer to the Metadata Routing User Guide for more details.

Callbacks#

sklearn.cluster#

sklearn.datasets#

sklearn.discriminant_analysis#

sklearn.metrics#

  • Efficiency Scorers created with make_scorer no longer deep-copy metadata kwargs on each call, reducing memory usage during model selection and cross-validation. By Stefanie Senger. #34236

sklearn.neighbors#

sklearn.preprocessing#

sklearn.svm#

sklearn.utils#

  • Fix The HTML representation of estimators now truncates the output feature list to 100 entries to improve rendering performance for estimators with many output features. By Dea María Léon. #34362

  • Fix Array API supporting functions and estimators that handle mixed input namespaces now make negative-stride NumPy arrays contiguous before transferring them to PyTorch through DLPack, avoiding a Python process abort in torch.from_dlpack. By Yin Li. #34380

  • Fix The copy-to-clipboard icons in the HTML representation of estimators are now rendered as <button> elements with an aria-label and a visible focus outline, instead of non-interactive <i> elements, so they are reachable and usable with a keyboard and screen readers. By Dea María Léon. #34429

  • Fix set_output(transform="polars") no longer emits a DeprecationWarning with polars>=1.42.1 by using how="horizontal_extend" instead of the deprecated how="horizontal" when concatenating polars dataframes. By Felix Hoehle. #34447

Version 1.9.0#

June 2026

Changed models#

  • Enhancement The transform method of preprocessing.PowerTransformer with method="yeo-johnson" now uses the numerical more stable function scipy.stats.yeojohnson instead of an own implementation. The results may deviate in numerical edge cases or within the precision of floating-point arithmetic. By Christian Lorentzen. #33272

Changes impacting many modules#

  • Major Feature Introduced a new config key: “sparse_interface” to control whether functions return sparse objects using SciPy sparse matrix or SciPy sparse array. Use sklearn.set_config(sparse_interface="sparray") to have sklearn return sparse arrays. See more at the SciPy Sparse Migration Guide. The scikit-learn config “sparse_interface” initially defaults to sparse matrix (“spmatrix”). The plan is to have the default change to sparse array (“sparray”) in a few releases. By Dan Schult. #31177

  • Enhancement Scikit-learn accepted a new library dependency: narwhals. This is a very lightweight dependency that simplifies the support of dataframe input X and dataframe output as specified in the set_output API. Examples are pandas and polars dataframes. Narwhals can also help to support more dataframe libraries. Another reason for its adoption was that the dataframe interchange protocol (__dataframe__) on which scikit-learn relied so far for non-pandas dataframes got deprecated by polars and has run its course. By Christian Lorentzen and Marco Gorelli. #31127

  • Enhancement The HTML representation of all scikit-learn estimators inheriting from base.BaseEstimator now displays a new block showing the number and names of the output features when using a compose.ColumnTransformer or a pipeline.FeatureUnion. A copy-paste button is available for the output features name. By Dea María Léon, Guillaume Lemaitre, Jérémie du Boisberranger, Olivier Grisel, Antoine Baker. #31937

  • Enhancement pipeline.Pipeline, pipeline.FeatureUnion and compose.ColumnTransformer now raise a clearer error message when an estimator class is passed instead of an instance. By Anne Beyer. #32888

  • Enhancement Checks for response values now provide a clearer error message when estimator does not implement the given response_method. By Quentin Barthélemy. #33126

  • Enhancement The HTML representation of all scikit-learn estimators inheriting from base.BaseEstimator now includes a table displaying their fitted attributes. These are all the public estimator attributes that are computed during the call to fit with a name that ends with an underscore. By Dea María Léon, Jérémie du Boisberranger, Olivier Grisel, Guillaume Lemaitre, Antoine Baker. #33399

  • Fix Raise ValueError when sample_weight contains only zero values to prevent meaningless input data during fitting. This change applies to all estimators that support the parameter sample_weight. This change also affects metrics that validate sample weights. By Lucy Liu and John Hendricks. #32212

  • Fix Some parameter descriptions in the HTML representation of estimators were not properly escaped, which could lead to malformed HTML if the description contains characters like < or >. By Olivier Grisel. #32942

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.

Callbacks#

sklearn.cluster#

sklearn.compose#

sklearn.datasets#

sklearn.decomposition#

sklearn.ensemble#

sklearn.feature_extraction#

sklearn.feature_selection#

sklearn.gaussian_process#

  • Efficiency Constructor signature of Gaussian process kernels is now cached, improving performance on small and medium datasets. By Stanislav Terliakov. #33067

  • Fix The hyperparameters of the default kernel of GaussianProcessRegressor, namely ConstantKernel() * RBF(), are now optimized when optimizer is not None. Thus, gpr = GaussianProcessRegressor().fit(X, y) uses optimized kernel hyperparameters. By Matthias De Lozzo. #32964

sklearn.inspection#

sklearn.linear_model#

sklearn.manifold#

sklearn.metrics#

sklearn.model_selection#

sklearn.neighbors#

sklearn.neural_network#

sklearn.pipeline#

sklearn.preprocessing#

sklearn.svm#

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.8, including:

AAAZZZR, ABHISHEK, Adrin Jalali, Agnus Paul, Ajay Raj, Akshita Sure, Albert Dorador Chalar, Alex Kuleshov, alexshacked, Alireza, Amine Abdellaziz, ANAND VENUGOPAL, Andres Nayeem Mejia, Andy, Anne Beyer, antoinebaker, Anton Karpov, Anvay, Arthur, Arthur Lacote, Arturo Amor, Ashutosh Devpura, Auguste Baum, Balaji Seshadri, baynecheke, Ben Pedigo, Bharat Raghunathan, Bodhi Russell Silberling, Bodhi Silberling, Bora Yongacoglu, camxx44, Chaitanya Dasari, Chani Fainendler, Charlie Tonneslan, Christian Lorentzen, Christian Veenhuis, Christian Yoon, Christine P. Chai, CipherCat, clijo, Colin Watson, C. Titus Brown, cui, Daniel Agyapong, Daniel Herrera-Esposito, Daniel R. Cassar, danilo-silva-ufsc, Dan Schult, david-cortes-intel, Dea María Léon, Dhruv Sharma, DhyeyTeraiya, Dimitri Papadopoulos Orfanos, Dmitry Kobak, EdenRochmanSharabi, eeshsaxena, Elizabeth DuPre, Emily (Xinyi) Chen, Eric Prestat, ethanglaser, fabianhenning, fhoehle, Florian Bourgey, François Paugam, Gaetan, Gaétan de Castellane, GarimaGarg222, GAUTAM V DATLA, Guillaume Lemaitre, Harsh Kumar Singh, Hashirama Senju, holodata-ej, Ho Yin Chau, imKartik5451, Isaacc, Itamar Turner-Trauring, Jake Blitch, Jake Vanderplas, James Dean, James Lamb, Jérémie du Boisberranger, Jim Crist-Harif, John Hendricks, Junteng Li, Karthik, Kiyarash Fazeli, Kropiunig, Kunle, Lev, Levente Csibi, Lisa, Loic Esteve, Lucas Colley, Lucas Oliveira, Lucy Liu, Luke Brace, Marco Edward Gorelli, marikabergengren, Martina Cvincekova, Matthias De Lozzo, Mohammad Ahmadullah Khan, Nguyen Cat Luong, Nicolas Salvy, Nikita, Nithurshen, Olivier Grisel, Omar Salman, pavitra danappa byali, pomrakna, prakritim01, Quentin Barthélemy, Ralf Gommers, Ram, Remi Gau, Reshama Shaikh, Riya Jha, Robert Pollak, Roman Yurchak, Rudrendu Paul, Samuel O. Ronsin, Sarvesh V, sauravyadav1008, Sepuri Sai Krishna, Seyi Kuforiji, Shadow_Lu, shifanaaaa, Shruti Nath, Shubhan Chari, Shyan Paul, Simon-Martin Schröder, Sophia Houhamdi, Stanislav Terliakov, Stefanie Senger, Taoufik KEHAL, Tejas, TejasAnalyst, Thomas J. Fan, Thomas Moreau, Thomas S., Tim Head, Tweezky66, Unique Shrestha, Varun Agnihotri, Vashita, vashita-pandey, Veer Tiwari, Virgil Chan, Wiktor Olszowy, Xiao Yuan, Yann Lechelle, Yin Li