Version 1.8
scikit-learn Docs · نسخهٔ 5e9184e53cd3 · BSD-3-Clause
===========
Version 1.8
For a short description of the main highlights of the release, please refer to sphx_glr_auto_examples_release_highlights_plot_release_highlights_1_8_0.py.
Version 1.8.0
December 2025
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. By Lucy Liu <lucyleeow> 31775
Support for Array API
Additional estimators and functions have been updated to include support for all Array API <https://data-apis.org/array-api/latest/>_ compliant inputs.
See array_api for more details.
- |Feature|
sklearn.preprocessing.StandardScalernow supports Array API compliant inputs.
By Alexander Fabisch <AlexanderFabisch>, Edoardo Abati <EdAbati>, Olivier Grisel <ogrisel> and Charles Hill <charlesjhill>. 27113
- |Feature|
linear_model.RidgeCV,linear_model.RidgeClassifierand
linear_model.RidgeClassifierCV now support array API compatible inputs with solver="svd". By Jérôme Dockès <jeromedockes>. 27961
- |Feature|
metrics.pairwise.pairwise_kernelsfor any kernel except
"laplacian" and metrics.pairwise_distances for metrics "cosine", "euclidean" and "l2" now support array API inputs. By Emily Chen <EmilyXinyi> and Lucy Liu <lucyleeow> 29822
- |Feature|
sklearn.metrics.confusion_matrixnow supports Array API compatible inputs.
By Stefanie Senger <StefanieSenger> 30562
- |Feature|
sklearn.mixture.GaussianMixturewith
init_params="random" or init_params="random_from_data" and warm_start=False now supports Array API compatible inputs. By Stefanie Senger <StefanieSenger> and Loïc Estève <lesteve> 30777
- |Feature|
sklearn.metrics.roc_curvenow supports Array API compatible inputs.
By Thomas Li <lithomas1> 30878
- |Feature|
preprocessing.PolynomialFeaturesnow supports array API compatible inputs.
By Omar Salman <OmarManzoor> 31580
- |Feature|
calibration.CalibratedClassifierCVnow supports array API compatible
inputs with method="temperature" and when the underlying estimator also supports the array API. By Omar Salman <OmarManzoor> 32246
- |Feature|
sklearn.metrics.precision_recall_curvenow supports array API compatible
inputs. By Lucy Liu <lucyleeow> 32249
- |Feature|
sklearn.model_selection.cross_val_predictnow supports array API compatible inputs.
By Omar Salman <OmarManzoor> 32270
- |Feature|
sklearn.metrics.brier_score_loss,sklearn.metrics.log_loss,
sklearn.metrics.d2_brier_score and sklearn.metrics.d2_log_loss_score now support array API compatible inputs. By Omar Salman <OmarManzoor> 32422
- |Feature|
naive_bayes.GaussianNBnow supports array API compatible inputs.
By Omar Salman <OmarManzoor> 32497
- |Feature|
preprocessing.LabelBinarizerandpreprocessing.label_binarizenow
support numeric array API compatible inputs with sparse_output=False. By Virgil Chan <virchan>. 32582
- |Feature|
sklearn.metrics.det_curvenow supports Array API compliant inputs.
By Josef Affourtit <jaffourt>. 32586
- |Feature|
sklearn.metrics.pairwise.manhattan_distancesnow supports array API compatible inputs.
By Omar Salman <OmarManzoor>. 32597
- |Feature|
sklearn.metrics.calinski_harabasz_scorenow supports Array API compliant inputs.
By Josef Affourtit <jaffourt>. 32600
- |Feature|
sklearn.metrics.balanced_accuracy_scorenow supports array API compatible inputs.
By Omar Salman <OmarManzoor>. 32604
- |Feature|
sklearn.metrics.pairwise.laplacian_kernelnow supports array API compatible inputs.
By Zubair Shakoor <zubairshakoorarbisoft>. 32613
- |Feature|
sklearn.metrics.cohen_kappa_scorenow supports array API compatible inputs.
By Omar Salman <OmarManzoor>. 32619
- |Feature|
sklearn.metrics.cluster.davies_bouldin_scorenow supports Array API compliant inputs.
By Josef Affourtit <jaffourt>. 32693
- |Fix| Estimators with array API support no longer reject dataframe inputs when array API support is enabled.
By Tim Head <betatim> 32838
Metadata routing
Refer to the Metadata Routing User Guide <metadata_routing> for more details.
- |Fix| Fixed an issue where passing
sample_weightto aPipelineinside a
GridSearchCV would raise an error with metadata routing enabled. By Adrin Jalali_. 31898
Free-threaded CPython 3.14 support
scikit-learn has support for free-threaded CPython, in particular free-threaded wheels are available for all of our supported platforms on Python 3.14.
Free-threaded (also known as nogil) CPython is a version of CPython that aims at enabling efficient multi-threaded use cases by removing the Global Interpreter Lock (GIL).
If you want to try out free-threaded Python, the recommendation is to use Python 3.14, that has fixed a number of issues compared to Python 3.13. Feel free to try free-threaded on your use case and report any issues!
For more details about free-threaded CPython see py-free-threading doc <https://py-free-threading.github.io>_, in particular how to install a free-threaded CPython <https://py-free-threading.github.io/installing_cpython/>_ and Ecosystem compatibility tracking <https://py-free-threading.github.io/tracking/>_.
By Loïc Estève <lesteve> and Olivier Grisel <ogrisel> and many other people in the wider Scientific Python and CPython ecosystem, for example Nathan Goldbaum <ngoldbaum>, Ralf Gommers <rgommers>, Edgar Andrés Margffoy Tuay <andfoy>. 32079
:mod:sklearn.base
- |Feature| Refactored
dirinBaseEstimatorto recognize condition check inavailable_if.
By John Hendricks <j-hendricks> and Miguel Parece <MiguelParece>. 31928
- |Fix| Fixed the handling of pandas missing values in HTML display of all estimators.
By Dea María Léon <deamarialeon>. 32341
:mod:sklearn.calibration
- |Feature| Added temperature scaling method in
calibration.CalibratedClassifierCV.
By Virgil Chan <virchan> and Christian Lorentzen <lorentzenchr>. 31068
:mod:sklearn.cluster
- |Efficiency|
cluster.kmeans_plusplusnow usesnp.cumsumdirectly without extra
numerical stability checks and without casting to np.float64. By Tiziano Zito <otizonaizit> 31991
- |Fix| The default value of the
copyparameter incluster.HDBSCAN
will change from False to True in 1.10 to avoid data modification and maintain consistency with other estimators. By Sarthak Puri <sarthakpurii>. 31973
:mod:sklearn.compose
- |Fix| The
compose.ColumnTransformernow correctly fits on data provided as a
polars.DataFrame when any transformer has a sparse output. By Phillipp Gnan <ph-ll-pp>. 32188
:mod:sklearn.covariance
- |Efficiency|
sklearn.covariance.GraphicalLasso,
sklearn.covariance.GraphicalLassoCV and sklearn.covariance.graphical_lasso with mode="cd" profit from the fit time performance improvement of sklearn.linear_model.Lasso by means of gap safe screening rules. By Christian Lorentzen <lorentzenchr>. 31987
- |Fix| Fixed uncontrollable randomness in
sklearn.covariance.GraphicalLasso,
sklearn.covariance.GraphicalLassoCV and sklearn.covariance.graphical_lasso. For mode="cd", they now use cyclic coordinate descent. Before, it was random coordinate descent with uncontrollable random number seeding. By Christian Lorentzen <lorentzenchr>. 31987
- |Fix| Added correction to
covariance.MinCovDetto adjust for
consistency at the normal distribution. This reduces the bias present when applying this method to data that is normally distributed. By Daniel Herrera-Esposito <dherrera1911> 32117
:mod:sklearn.decomposition
- |Efficiency|
sklearn.decomposition.DictionaryLearningand
sklearn.decomposition.MiniBatchDictionaryLearning with fit_algorithm="cd", sklearn.decomposition.SparseCoder with transform_algorithm="lasso_cd", sklearn.decomposition.MiniBatchSparsePCA, sklearn.decomposition.SparsePCA, sklearn.decomposition.dict_learning and sklearn.decomposition.dict_learning_online with method="cd", sklearn.decomposition.sparse_encode with algorithm="lasso_cd" all profit from the fit time performance improvement of sklearn.linear_model.Lasso by means of gap safe screening rules. By Christian Lorentzen <lorentzenchr>. 31987
- |Enhancement|
decomposition.SparseCodernow follows the transformer API of scikit-learn.
In addition, the fit method now validates the input and parameters. By François Paugam <FrancoisPgm>. 32077
- |Fix| Add input checks to the
inverse_transformmethod ofdecomposition.PCA
and decomposition.IncrementalPCA. 29310 by Ian Faust <icfaust>. 29310
:mod:sklearn.discriminant_analysis
- |Feature| Added
solver,covariance_estimatorandshrinkagein
discriminant_analysis.QuadraticDiscriminantAnalysis. The resulting class is more similar to discriminant_analysis.LinearDiscriminantAnalysis and allows for more flexibility in the estimation of the covariance matrices. By Daniel Herrera-Esposito <dherrera1911>. 32108
:mod:sklearn.ensemble
- |Fix|
ensemble.BaggingClassifier,ensemble.BaggingRegressorand
ensemble.IsolationForest now use sample_weight to draw the samples instead of forwarding them multiplied by a uniformly sampled mask to the underlying estimators. Furthermore, when max_samples is a float, it is now interpreted as a fraction of sample_weight.sum() instead of X.shape[0]. The new default max_samples=None draws X.shape[0] samples, irrespective of sample_weight. By Antoine Baker <antoinebaker>. 31414 and 32825
:mod:sklearn.feature_selection
- |Enhancement|
feature_selection.SelectFromModelnow does not forcemax_featuresto be
less than or equal to the number of input features. By Thibault <ThibaultDECO> 31939
:mod:sklearn.gaussian_process
- |Efficiency| make
GaussianProcessRegressor.predictfaster whenreturn_covand
return_std are both False. By Rafael Ayllón Gavilán <RafaAyGar>. 31431
:mod:sklearn.linear_model
- |Efficiency|
linear_model.ElasticNetandlinear_model.Lassowith
precompute=False use less memory for dense X and are a bit faster. Previously, they used twice the memory of X even for Fortran-contiguous X. By Christian Lorentzen <lorentzenchr> 31665
- |Efficiency|
linear_model.ElasticNetandlinear_model.Lassoavoid
double input checking and are therefore a bit faster. By Christian Lorentzen <lorentzenchr>. 31848
- |Efficiency|
linear_model.ElasticNet,linear_model.ElasticNetCV,
linear_model.Lasso, linear_model.LassoCV, linear_model.MultiTaskElasticNet, linear_model.MultiTaskElasticNetCV, linear_model.MultiTaskLasso and linear_model.MultiTaskLassoCV are faster to fit by avoiding a BLAS level 1 (axpy) call in the innermost loop. Same for functions linear_model.enet_path and linear_model.lasso_path. By Christian Lorentzen <lorentzenchr> 31956 and 31880
- |Efficiency|
linear_model.ElasticNetCV,linear_model.LassoCV,
linear_model.MultiTaskElasticNetCV and linear_model.MultiTaskLassoCV avoid an additional copy of X with default copy_X=True. By Christian Lorentzen <lorentzenchr>. 31946
- |Efficiency|
linear_model.ElasticNet,linear_model.ElasticNetCV,
linear_model.Lasso, linear_model.LassoCV, linear_model.MultiTaskElasticNet, linear_model.MultiTaskElasticNetCV linear_model.MultiTaskLasso, linear_model.MultiTaskLassoCV as well as linear_model.lasso_path and linear_model.enet_path now implement gap safe screening rules in the coordinate descent solver for dense and sparse X. The speedup of fitting time is particularly pronounced (10-times is possible) when computing regularization paths like the \*CV-variants of the above estimators do. There is now an additional check of the stopping criterion before entering the main loop of descent steps. As the stopping criterion requires the computation of the dual gap, the screening happens whenever the dual gap is computed. By Christian Lorentzen <lorentzenchr> 31882, 31986, 31987 and 32014
- |Enhancement|
linear_model.ElasticNet,linear_model.ElasticNetCV,
linear_model.Lasso, linear_model.LassoCV, MultiTaskElasticNet, MultiTaskElasticNetCV, MultiTaskLasso, MultiTaskLassoCV, as well as linear_model.enet_path and linear_model.lasso_path now use dual gap <= tol instead of dual gap < tol as stopping criterion. The resulting coefficients might differ to previous versions of scikit-learn in rare cases. By Christian Lorentzen <lorentzenchr>. 31906
- |Fix| Fix the convergence criteria for SGD models, to avoid premature convergence when
tol != None. This primarily impacts SGDOneClassSVM but also affects SGDClassifier and SGDRegressor. Before this fix, only the loss function without penalty was used as the convergence check, whereas now, the full objective with regularization is used. By Guillaume Lemaitre <glemaitre> and kostayScr <kostayScr> 31856
- |Fix| The allowed parameter range for the initial learning rate
eta0in
linear_model.SGDClassifier, linear_model.SGDOneClassSVM, linear_model.SGDRegressor and linear_model.Perceptron changed from non-negative numbers to strictly positive numbers. As a consequence, the default eta0 of linear_model.SGDClassifier and linear_model.SGDOneClassSVM changed from 0 to 0.01. But note that eta0 is not used by the default learning rate "optimal" of those two estimators. By Christian Lorentzen <lorentzenchr>. 31933
- |Enhancement|
linear_model.LogisticRegressionCVis able to handle CV splits where
some class labels are missing in some folds. Before, it raised an error whenever a class label were missing in a fold. By Christian Lorentzen <lorentzenchr>. 32747
- |API|
linear_model.PassiveAggressiveClassifierand
linear_model.PassiveAggressiveRegressor are deprecated and will be removed in 1.10. Equivalent estimators are available with linear_model.SGDClassifier and SGDRegressor, both of which expose the options learning_rate="pa1" and "pa2". The parameter eta0 can be used to specify the aggressiveness parameter of the Passive-Aggressive-Algorithms, called C in the reference paper. By Christian Lorentzen <lorentzenchr> 31932 and 29097
- |API|
linear_model.SGDClassifier,linear_model.SGDRegressor, and
linear_model.SGDOneClassSVM now deprecate negative values for the power_t parameter. Using a negative value will raise a warning in version 1.8 and will raise an error in version 1.10. A value in the range [0.0, inf) must be used instead. By Ritvi Alagusankar <ritvi-alagusankar> 31474
- |API| Raising error in
sklearn.linear_model.LogisticRegressionwhen
liblinear solver is used and input X values are larger than 1e30, the liblinear solver freezes otherwise. By Shruti Nath <snath-xoc>. 31888
- |API|
linear_model.LogisticRegressionCVgot a new parameter
use_legacy_attributes to control the types and shapes of the fitted attributes C_, l1_ratio_, coefs_paths_, scores_ and n_iter_. The current default value True keeps the legacy behaviour. If False then:
- `
C_` is a float. - `
l1_ratio_` is a float. - `
coefs_paths_` is an ndarray of shape
(n_folds, n_l1_ratios, n_cs, n_classes, n_features). For binary problems (n_classes=2), the 2nd last dimension is 1.
- `
scores_` is an ndarray of shape (n_folds, n_l1_ratios, n_cs). - `
n_iter_` is an ndarray of shape (n_folds, n_l1_ratios, n_cs).
In version 1.10, the default will change to False and use_legacy_attributes will be deprecated. In 1.12 use_legacy_attributes will be removed. By Christian Lorentzen <lorentzenchr>. 32114
- |API| Parameter
penaltyoflinear_model.LogisticRegressionand
linear_model.LogisticRegressionCV is deprecated and will be removed in version 1.10. The equivalent behaviour can be obtained as follows:
- for
linear_model.LogisticRegression
- use
l1_ratio=0instead ofpenalty="l2" - use
l1_ratio=1instead ofpenalty="l1" - use
0<l1_ratio<1instead ofpenalty="elasticnet" - use
C=np.infinstead ofpenalty=None
- for
linear_model.LogisticRegressionCV
- use
l1_ratios=(0,)instead ofpenalty="l2" - use
l1_ratios=(1,)instead ofpenalty="l1" - the equivalent of
penalty=Noneis to havenp.infas an element of theCsparameter
For linear_model.LogisticRegression, the default value of l1_ratio has changed from None to 0.0. Setting l1_ratio=None is deprecated and will raise an error in version 1.10
For linear_model.LogisticRegressionCV, the default value of l1_ratios has changed from None to "warn". It will be changed to (0,) in version 1.10. Setting l1_ratios=None is deprecated and will raise an error in version 1.10.
By Christian Lorentzen <lorentzenchr>. 32659
- |API| The
n_jobsparameter oflinear_model.LogisticRegressionis deprecated and
will be removed in 1.10. It has no effect since 1.8. By Loïc Estève <lesteve>. 32742
:mod:sklearn.manifold
- |MajorFeature|
manifold.ClassicalMDSwas implemented to perform classical MDS
(eigendecomposition of the double-centered distance matrix). By Dmitry Kobak <dkobak> and Meekail Zain <Micky774> 31322
- |Feature|
manifold.MDSnow supports arbitrary distance metrics
(via metric and metric_params parameters) and initialization via classical MDS (via init parameter). The dissimilarity parameter was deprecated. The old metric parameter was renamed into metric_mds. By Dmitry Kobak <dkobak> 32229
- |Feature|
manifold.TSNEnow supports PCA initialization with sparse input matrices.
By Arturo Amor <ArturoAmorQ>. 32433
:mod:sklearn.metrics
- |Feature|
metrics.d2_brier_scorehas been added which calculates the D^2 for the Brier score.
By Omar Salman <OmarManzoor>. 28971
- |Feature| Add
metrics.confusion_matrix_at_thresholdsfunction that returns the number of
true negatives, false positives, false negatives and true positives per threshold. By Success Moses <SuccessMoses>. 30134
- |Efficiency| Avoid redundant input validation in
metrics.d2_log_loss_score
leading to a 1.2x speedup in large scale benchmarks. By Olivier Grisel <ogrisel> and Omar Salman <OmarManzoor> 32356
- |Enhancement|
metrics.median_absolute_errornow supports Array API compatible inputs.
By Lucy Liu <lucyleeow>. 31406
- |Enhancement| Improved the error message for sparse inputs for the following metrics:
metrics.accuracy_score, metrics.multilabel_confusion_matrix, metrics.jaccard_score, metrics.zero_one_loss, metrics.f1_score, metrics.fbeta_score, metrics.precision_recall_fscore_support, metrics.class_likelihood_ratios, metrics.precision_score, metrics.recall_score, metrics.classification_report, metrics.hamming_loss. By Lucy Liu <lucyleeow>. 32047
- |Fix|
metrics.median_absolute_errornow uses_averaged_weighted_percentile
instead of _weighted_percentile to calculate median when sample_weight is not None. This is equivalent to using the "averaged_inverted_cdf" instead of the "inverted_cdf" quantile method, which gives results equivalent to numpy.median if equal weights used. By Lucy Liu <lucyleeow> 30787
- |Fix| Additional
sample_weightchecking has been added to
metrics.accuracy_score, metrics.balanced_accuracy_score, metrics.brier_score_loss, metrics.class_likelihood_ratios, metrics.classification_report, metrics.cohen_kappa_score, metrics.confusion_matrix, metrics.f1_score, metrics.fbeta_score, metrics.hamming_loss, metrics.jaccard_score, metrics.matthews_corrcoef, metrics.multilabel_confusion_matrix, metrics.precision_recall_fscore_support, metrics.precision_score, metrics.recall_score and metrics.zero_one_loss. sample_weight can only be 1D, consistent to y_true and y_pred in length,and all values must be finite and not complex. By Lucy Liu <lucyleeow>. 31701
- |Fix|
y_predis deprecated in favour ofy_scorein
metrics.DetCurveDisplay.from_predictions and metrics.PrecisionRecallDisplay.from_predictions. y_pred will be removed in v1.10. By Luis <luiser1401> 31764
- |Fix|
repron a scorer which has been created with apartialscore_funcnow correctly
works and uses the repr of the given partial object. By Adrin Jalali_. 31891
- |Fix| kwargs specified in the
curve_kwargsparameter of
metrics.RocCurveDisplay.from_cv_results now only overwrite their corresponding default value before being passed to Matplotlib's plot. Previously, passing any curve_kwargs would overwrite all default kwargs. By Lucy Liu <lucyleeow>. 32313
- |Fix| Registered named scorer objects for
metrics.d2_brier_scoreand
metrics.d2_log_loss_score and updated their input validation to be consistent with related metric functions. By Olivier Grisel <ogrisel> and Omar Salman <OmarManzoor> 32356
- |Fix|
metrics.RocCurveDisplay.from_cv_resultswill now inferpos_labelas
estimator.classes_[-1], using the estimator from cv_results, when pos_label=None. Previously, an error was raised when pos_label=None. By Lucy Liu <lucyleeow>. 32372
- |Fix| All classification metrics now raise a
ValueErrorwhen required input arrays
(y_pred, y_true, y1, y2, pred_decision, or y_proba) are empty. Previously, accuracy_score, class_likelihood_ratios, classification_report, confusion_matrix, hamming_loss, jaccard_score, matthews_corrcoef, multilabel_confusion_matrix, and precision_recall_fscore_support did not raise this error consistently. By Stefanie Senger <StefanieSenger>. 32549
- |API|
metrics.cluster.entropyis deprecated and will be removed in v1.10.
By Lucy Liu <lucyleeow> 31294
- |API| The
estimator_nameparameter is deprecated in favour ofnamein
metrics.PrecisionRecallDisplay and will be removed in 1.10. By Lucy Liu <lucyleeow>. 32310
:mod:sklearn.model_selection
- |Enhancement|
model_selection.StratifiedShuffleSplitwill now specify which classes
have too few members when raising a `ValueError if any class has less than 2 members. This is useful to identify which classes are causing the error. By Marc Bresson <MarcBresson> 32265`
- |Fix| Fix shuffle behaviour in
model_selection.StratifiedGroupKFold. Now
stratification among folds is also preserved when shuffle=True. By Pau Folch <pfolch>. 32540
:mod:sklearn.multiclass
- |Fix| Fix tie-breaking behavior in
multiclass.OneVsRestClassifierto match
np.argmax tie-breaking behavior. By Lakshmi Krishnan <lakrish>. 15504
:mod:sklearn.naive_bayes
- |Fix|
naive_bayes.GaussianNBpreserves the dtype of the fitted attributes
according to the dtype of X. By Omar Salman <OmarManzoor> 32497
:mod:sklearn.preprocessing
- |Enhancement|
preprocessing.SplineTransformercan now handle missing values with the
parameter handle_missing. By Stefanie Senger <StefanieSenger>. 28043
- |Enhancement| The
preprocessing.PowerTransformernow returns a warning
when NaN values are encountered in the inverse transform, inverse_transform, typically caused by extremely skewed data. By Roberto Mourao <maf-rnmourao> 29307
- |Enhancement|
preprocessing.MaxAbsScalercan now clip out-of-range values in held-out data
with the parameter clip. By Hleb Levitski <glevv>. 31790
- |Fix| Fixed a bug in
preprocessing.OneHotEncoderwherehandle_unknown='warn'incorrectly behaved like'ignore'instead of'infrequent_if_exist'.
By Nithurshen <nithurshen> 32592
:mod:sklearn.semi_supervised
- |Fix| User written kernel results are now normalized in
semi_supervised.LabelPropagation so all row sums equal 1 even if kernel gives asymmetric or non-uniform row sums. By Dan Schult <dschult>. 31924
:mod:sklearn.tree
- |Efficiency|
tree.DecisionTreeRegressorwithcriterion="absolute_error"
now runs much faster: O(n log n) complexity against previous O(n^2) allowing to scale to millions of data points, even hundred of millions. By Arthur Lacote <cakedev0> 32100
- |Fix| Make
tree.export_textthread-safe.
By Olivier Grisel <ogrisel>. 30041
- |Fix|
~sklearn.tree.export_graphviznow raises aValueErrorif given feature
names are not all strings. By Guilherme Peixoto <guilhermecsnpeixoto> 31036
- |Fix|
tree.DecisionTreeRegressorwithcriterion="absolute_error"
would sometimes make sub-optimal splits (i.e. splits that don't minimize the absolute error). Now it's fixed. Hence retraining trees might gives slightly different results. By Arthur Lacote <cakedev0> 32100
- |Fix| Fixed a regression in
decision trees <tree>where almost constant features were
not handled properly. By Sercan Turkmen <sercant>. 32259
- |Fix| Fixed splitting logic during training in
tree.DecisionTree*
(and consequently in ensemble.RandomForest*) for nodes containing near-constant feature values and missing values. Beforehand, trees were cut short if a constant feature was found, even if there was more splitting that could be done on the basis of missing values. By Arthur Lacote <cakedev0> 32274
- |Fix| Fix handling of missing values in method
decision_pathof trees
(tree.DecisionTreeClassifier, tree.DecisionTreeRegressor, tree.ExtraTreeClassifier and tree.ExtraTreeRegressor) By Arthur Lacote <cakedev0>. 32280
- |Fix| Fix decision tree splitting with missing values present in some features. In some cases the last
non-missing sample would not be partitioned correctly. By Tim Head <betatim> and Arthur Lacote <cakedev0>. 32351
:mod:sklearn.utils
- |Efficiency| The function
sklearn.utils.extmath.safe_sparse_dotwas improved by a dedicated
Cython routine for the case of a @ b with sparse 2-dimensional a and b and when a dense output is required, i.e., dense_output=True. This improves several algorithms in scikit-learn when dealing with sparse arrays (or matrices). By Christian Lorentzen <lorentzenchr>. 31952
- |Enhancement| The parameter table in the HTML representation of all scikit-learn estimators and
more generally of estimators inheriting from base.BaseEstimator now displays the parameter description as a tooltip and has a link to the online documentation for each parameter. By Dea María Léon <DeaMariaLeon>. 31564
- |Enhancement| `
sklearn.utils._check_sample_weight` now raises a clearer error message when the
provided weights are neither a scalar nor a 1-D array-like of the same size as the input data. By Kapil Parekh <kapslock123>. 31873
- |Enhancement|
sklearn.utils.estimator_checks.parametrize_with_checksnow lets you configure
strict mode for xfailing checks. Tests that unexpectedly pass will lead to a test failure. The default behaviour is unchanged. By Tim Head <betatim>. 31951
- |Enhancement| Fixed the alignment of the "?" and "i" symbols and improved the color style of the
HTML representation of estimators. By Guillaume Lemaitre <glemaitre>. 31969
- |Fix| Changes the way color are chosen when displaying an estimator as an HTML representation. Colors are not adapted anymore to the user's theme, but chosen based on theme declared color scheme (light or dark) for VSCode and JupyterLab. If theme does not declare a color scheme, scheme is chosen according to default text color of the page, if it fails fallbacks to a media query.
By Matt J. <rouk1>. 32330
- |API|
utils.extmath.stable_cumsumis deprecated and will be removed
in v1.10. Use np.cumulative_sum with the desired dtype directly instead. By Tiziano Zito <opossumnano>. 32258
Thanks to everyone who has contributed to the maintenance and improvement of the project since version 1.7, including:
$id, 4hm3d, Acciaro Gennaro Daniele, achyuthan.s, Adam J. Stewart, Adriano Leão, Adrien Linares, Adrin Jalali, Aitsaid Azzedine Idir, Alexander Fabisch, Alexandre Abraham, Andrés H. Zapke, Anne Beyer, Anthony Gitter, AnthonyPrudent, antoinebaker, Arpan Mukherjee, Arthur, Arthur Lacote, Arturo Amor, ayoub.agouzoul, Ayrat, Ayush, Ayush Tanwar, Basile Jezequel, Bhavya Patwa, BRYANT MUSI BABILA, Casey Heath, Chems Ben, Christian Lorentzen, Christian Veenhuis, Christine P. Chai, cstec, C. Titus Brown, Daniel Herrera-Esposito, Dan Schult, dbXD320, Dea María Léon, Deepyaman Datta, dependabot[bot], Dhyey Findoriya, Dimitri Papadopoulos Orfanos, Dipak Dhangar, Dmitry Kobak, elenafillo, Elham Babaei, EmilyXinyi, Emily (Xinyi) Chen, Eugen-Bleck, Evgeni Burovski, fabarca, Fabrizio Damicelli, Faizan-Ul Huda, François Goupil, François Paugam, Gaetan, GaetandeCast, Gesa Loof, Gonçalo Guiomar, Gordon Grey, Gowtham Kumar K., Guilherme Peixoto, Guillaume Lemaitre, hakan çanakçı, Harshil Sanghvi, Henri Bonamy, Hleb Levitski, HulusiOzy, hvtruong, Ian Faust, Imad Saddik, Jérémie du Boisberranger, Jérôme Dockès, John Hendricks, Joris Van den Bossche, Josef Affourtit, Josh, jshn9515, Junaid, KALLA GANASEKHAR, Kapil Parekh, Kenneth Enevoldsen, Kian Eliasi, kostayScr, Krishnan Vignesh, kryggird, Kyle S, Lakshmi Krishnan, Leomax, Loic Esteve, Luca Bittarello, Lucas Colley, Lucy Liu, Luigi Giugliano, Luis, Mahdi Abid, Mahi Dhiman, Maitrey Talware, Mamduh Zabidi, Manikandan Gobalakrishnan, Marc Bresson, Marco Edward Gorelli, Marek Pokropiński, Maren Westermann, Marie Sacksick, Marija Vlajic, Matt J., Mayank Raj, Michael Burkhart, Michael Šimáček, Miguel Fernandes, Miro Hrončok, Mohamed DHIFALLAH, Muhammad Waseem, MUHAMMED SINAN D, Natalia Mokeeva, Nicholas Farr, Nicolas Bolle, Nicolas Hug, nithish-74, Nithurshen, Nitin Pratap Singh, NotAceNinja, Olivier Grisel, omahs, Omar Salman, Patrick Walsh, Peter Holzer, pfolch, ph-ll-pp, Prashant Bansal, Quan H. Nguyen, Radovenchyk, Rafael Ayllón Gavilán, Raghvender, Ranjodh Singh, Ravichandranayakar, Remi Gau, Reshama Shaikh, Richard Harris, RishiP2006, Ritvi Alagusankar, Roberto Mourao, Robert Pollak, Roshangoli, roychan, R Sagar Shresti, Sarthak Puri, saskra, scikit-learn-bot, Scott Huberty, Sercan Turkmen, Sergio P, Shashank S, Shaurya Bisht, Shivam, Shruti Nath, SIKAI ZHANG, sisird864, SiyuJin-1, S. M. Mohiuddin Khan Shiam, Somdutta Banerjee, sotagg, Sota Goto, Spencer Bradkin, Stefan, Stefanie Senger, Steffen Rehberg, Steven Hur, Success Moses, Sylvain Combettes, ThibaultDECO, Thomas J. Fan, Thomas Li, Thomas S., Tim Head, Tingwei Zhu, Tiziano Zito, TJ Norred, Username46786, Utsab Dahal, Vasanth K, Veghit, VirenPassi, Virgil Chan, Vivaan Nanavati, Xiao Yuan, xuzhang0327, Yaroslav Halchenko, Yaswanth Kumar, Zijun yi, zodchi94, Zubair Shakoor