head 1.3; access; symbols pkgsrc-2026Q3:1.3.0.6 pkgsrc-2026Q3-base:1.3 pkgsrc-2026Q2:1.3.0.4 pkgsrc-2026Q2-base:1.3 pkgsrc-2026Q1:1.3.0.2 pkgsrc-2026Q1-base:1.3 pkgsrc-2025Q4:1.2.0.12 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.10 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.8 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.2.0.6 pkgsrc-2025Q1-base:1.2 pkgsrc-2024Q4:1.2.0.4 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.2.0.2 pkgsrc-2024Q3-base:1.2 pkgsrc-2024Q2:1.1.0.6 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.4 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.2 pkgsrc-2023Q4-base:1.1; locks; strict; comment @# @; 1.3 date 2026.01.11.10.28.55; author adam; state Exp; branches; next 1.2; commitid fSpcRY4vYcvXGXpG; 1.2 date 2024.08.03.07.21.06; author adam; state Exp; branches; next 1.1; commitid ks1sCmBVr9sEylkF; 1.1 date 2023.11.13.10.42.42; author wiz; state Exp; branches; next ; commitid ks71BhLsk663arME; desc @@ 1.3 log @py-scikit-learn: updated to 1.8.0 Version 1.8.0 Changes impacting many modules - |Efficiency| Improved CPU and memory usage in estimators and metric functions that rely on weighted percentiles and better match NumPy and Scipy (un-weighted) implementations of percentiles. Support for Array API Additional estimators and functions have been updated to include support for all `Array API `_ compliant inputs. @ text @$NetBSD: patch-sklearn_preprocessing___target__encoder__fast.pyx,v 1.2 2024/08/03 07:21:06 adam Exp $ Fix build on NetBSD. --- sklearn/preprocessing/_target_encoder_fast.pyx.orig 2025-12-09 16:13:35.000000000 +0000 +++ sklearn/preprocessing/_target_encoder_fast.pyx @@@@ -1,4 +1,4 @@@@ -from libc.math cimport isnan +from libcpp.cmath cimport isnan from libcpp.vector cimport vector from sklearn.utils._typedefs cimport float32_t, float64_t, int32_t, int64_t @ 1.2 log @py-scikit-learn: updated to 1.5.1 Version 1.5.1 ============= **July 2024** Changes impacting many modules ------------------------------ - |Fix| Fixed a regression in the validation of the input data of all estimators where an unexpected error was raised when passing a DataFrame backed by a read-only buffer. :pr:`29018` by :user:`Jérémie du Boisberranger `. - |Fix| Fixed a regression causing a dead-lock at import time in some settings. :pr:`29235` by :user:`Jérémie du Boisberranger `. Changelog --------- :mod:`sklearn.compose` ...................... - |Efficiency| Fix a performance regression in :class:`compose.ColumnTransformer` where the full input data was copied for each transformer when `n_jobs > 1`. :pr:`29330` by :user:`Jérémie du Boisberranger `. :mod:`sklearn.metrics` ...................... - |Fix| Fix a regression in :func:`metrics.r2_score`. Passing torch CPU tensors with array API dispatched disabled would complain about non-CPU devices instead of implicitly converting those inputs as regular NumPy arrays. :pr:`29119` by :user:`Olivier Grisel`. - |Fix| Fix a regression in :func:`metrics.accuracy_score` and in :func:`metrics.zero_one_loss` causing an error for Array API dispatch with multilabel inputs. :pr:`29269` by :user:`Yaroslav Korobko ` and :pr:`29336` by :user:`Edoardo Abati `. :mod:`sklearn.model_selection` .............................. - |Fix| Fix a regression in :class:`model_selection.GridSearchCV` for parameter grids that have heterogeneous parameter values. :pr:`29078` by :user:`Loïc Estève `. - |Fix| Fix a regression in :class:`model_selection.GridSearchCV` for parameter grids that have estimators as parameter values. :pr:`29179` by :user:`Marco Gorelli`. - |Fix| Fix a regression in :class:`model_selection.GridSearchCV` for parameter grids that have arrays of different sizes as parameter values. :pr:`29314` by :user:`Marco Gorelli`. :mod:`sklearn.tree` ................... - |Fix| Fix an issue in :func:`tree.export_graphviz` and :func:`tree.plot_tree` that could potentially result in exception or wrong results on 32bit OSes. :pr:`29327` by :user:`Loïc Estève`. :mod:`sklearn.utils` .................... - |API| :func:`utils.validation.check_array` has a new parameter, `force_writeable`, to control the writeability of the output array. If set to `True`, the output array will be guaranteed to be writeable and a copy will be made if the input array is read-only. If set to `False`, no guarantee is made about the writeability of the output array. :pr:`29018` by :user:`Jérémie du Boisberranger `. .. _changes_1_5: Version 1.5.0 ============= **May 2024** Security -------- - |Fix| :class:`feature_extraction.text.CountVectorizer` and :class:`feature_extraction.text.TfidfVectorizer` no longer store discarded tokens from the training set in their `stop_words_` attribute. This attribute would hold too frequent (above `max_df`) but also too rare tokens (below `min_df`). This fixes a potential security issue (data leak) if the discarded rare tokens hold sensitive information from the training set without the model developer's knowledge. Note: users of those classes are encouraged to either retrain their pipelines with the new scikit-learn version or to manually clear the `stop_words_` attribute from previously trained instances of those transformers. This attribute was designed only for model inspection purposes and has no impact on the behavior of the transformers. :pr:`28823` by :user:`Olivier Grisel `. Changed models -------------- - |Efficiency| The subsampling in :class:`preprocessing.QuantileTransformer` is now more efficient for dense arrays but the fitted quantiles and the results of `transform` may be slightly different than before (keeping the same statistical properties). :pr:`27344` by :user:`Xuefeng Xu `. - |Enhancement| :class:`decomposition.PCA`, :class:`decomposition.SparsePCA` and :class:`decomposition.TruncatedSVD` now set the sign of the `components_` attribute based on the component values instead of using the transformed data as reference. This change is needed to be able to offer consistent component signs across all `PCA` solvers, including the new `svd_solver="covariance_eigh"` option introduced in this release. Changes impacting many modules ------------------------------ - |Fix| Raise `ValueError` with an informative error message when passing 1D sparse arrays to methods that expect 2D sparse inputs. :pr:`28988` by :user:`Olivier Grisel `. - |API| The name of the input of the `inverse_transform` method of estimators has been standardized to `X`. As a consequence, `Xt` is deprecated and will be removed in version 1.7 in the following estimators: :class:`cluster.FeatureAgglomeration`, :class:`decomposition.MiniBatchNMF`, :class:`decomposition.NMF`, :class:`model_selection.GridSearchCV`, :class:`model_selection.RandomizedSearchCV`, :class:`pipeline.Pipeline` and :class:`preprocessing.KBinsDiscretizer`. :pr:`28756` by :user:`Will Dean `. Support for Array API --------------------- Additional estimators and functions have been updated to include support for all `Array API `_ compliant inputs. See :ref:`array_api` for more details. **Functions:** - :func:`sklearn.metrics.r2_score` now supports Array API compliant inputs. :pr:`27904` by :user:`Eric Lindgren `, :user:`Franck Charras `, :user:`Olivier Grisel ` and :user:`Tim Head `. **Classes:** - :class:`linear_model.Ridge` now supports the Array API for the `svd` solver. See :ref:`array_api` for more details. :pr:`27800` by :user:`Franck Charras `, :user:`Olivier Grisel ` and :user:`Tim Head `. Support for building with Meson ------------------------------- From scikit-learn 1.5 onwards, Meson is the main supported way to build scikit-learn, see :ref:`Building from source ` for more details. Unless we discover a major blocker, setuptools support will be dropped in scikit-learn 1.6. The 1.5.x releases will support building scikit-learn with setuptools. Meson support for building scikit-learn was added in :pr:`28040` by :user:`Loïc Estève ` Metadata Routing ---------------- The following models now support metadata routing in one or more or their methods. Refer to the :ref:`Metadata Routing User Guide ` for more details. - |Feature| :class:`impute.IterativeImputer` now supports metadata routing in its `fit` method. :pr:`28187` by :user:`Stefanie Senger `. - |Feature| :class:`ensemble.BaggingClassifier` and :class:`ensemble.BaggingRegressor` now support metadata routing. The fit methods now accept ``**fit_params`` which are passed to the underlying estimators via their `fit` methods. :pr:`28432` by :user:`Adam Li ` and :user:`Benjamin Bossan `. - |Feature| :class:`linear_model.RidgeCV` and :class:`linear_model.RidgeClassifierCV` now support metadata routing in their `fit` method and route metadata to the underlying :class:`model_selection.GridSearchCV` object or the underlying scorer. :pr:`27560` by :user:`Omar Salman `. - |Feature| :class:`GraphicalLassoCV` now supports metadata routing in it's `fit` method and routes metadata to the CV splitter. :pr:`27566` by :user:`Omar Salman `. - |Feature| :class:`linear_model.RANSACRegressor` now supports metadata routing in its ``fit``, ``score`` and ``predict`` methods and route metadata to its underlying estimator's' ``fit``, ``score`` and ``predict`` methods. :pr:`28261` by :user:`Stefanie Senger `. - |Feature| :class:`ensemble.VotingClassifier` and :class:`ensemble.VotingRegressor` now support metadata routing and pass ``**fit_params`` to the underlying estimators via their `fit` methods. :pr:`27584` by :user:`Stefanie Senger `. - |Feature| :class:`pipeline.FeatureUnion` now supports metadata routing in its ``fit`` and ``fit_transform`` methods and route metadata to the underlying transformers' ``fit`` and ``fit_transform``. :pr:`28205` by :user:`Stefanie Senger `. - |Fix| Fix an issue when resolving default routing requests set via class attributes. :pr:`28435` by `Adrin Jalali`_. - |Fix| Fix an issue when `set_{method}_request` methods are used as unbound methods, which can happen if one tries to decorate them. :pr:`28651` by `Adrin Jalali`_. - |FIX| Prevent a `RecursionError` when estimators with the default `scoring` param (`None`) route metadata. :pr:`28712` by :user:`Stefanie Senger `. @ text @d1 1 a1 1 $NetBSD: patch-sklearn_preprocessing___target__encoder__fast.pyx,v 1.1 2023/11/13 10:42:42 wiz Exp $ d5 1 a5 1 --- sklearn/preprocessing/_target_encoder_fast.pyx.orig 2024-07-02 17:14:07.000000000 +0000 d12 1 a12 1 from ..utils._typedefs cimport float32_t, float64_t, int32_t, int64_t @ 1.1 log @py-scikit-learn: fix build on NetBSD @ text @d1 1 a1 1 $NetBSD$ d5 1 a5 1 --- sklearn/preprocessing/_target_encoder_fast.pyx.orig 2023-10-23 10:11:35.000000000 +0000 d9 1 a9 1 +from libcpp.cmath cimport isnan as isnan d12 1 a12 1 cimport numpy as cnp @