Version 1.8#
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.8.dev0#
August 2025
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.
Feature
sklearn.metrics.confusion_matrix
now supports Array API compatible inputs. By Stefanie Senger #30562Feature
sklearn.gaussian_mixture.GaussianMixture
withinit_params="random"
orinit_params="random_from_data"
andwarm_start=False
now supports Array API compatible inputs. By Stefanie Senger and Loïc Estève #30777Feature
sklearn.metrics.roc_curve
now supports Array API compatible inputs. By Thomas Li #30878Feature
preprocessing.PolynomialFeatures
now supports array API compatible inputs. By Omar Salman #31580Enhancement
metrics.pairwise.pairwise_kernels
now supports Array API compatible inputs, when the underlingmetric
does (the only metric NOT currently supported issklearn.metrics.pairwise.laplacian_kernel
). By Emily Chen and Lucy Liu.metrics.pairwise.pairwise_distances
now supports Array API compatible inputs, when the underlyingmetric
does (currently “cosine”, “euclidean” and “l2”). By Emily Chen and Lucy Liu. #29822
sklearn.calibration
#
Feature Added temperature scaling method in
caliabration.CalibratedClassifierCV
. By Virgil Chan and Christian Lorentzen. #31068
sklearn.compose
#
Fix
compose.TransformedTargetRegressor
now passes the transformed target to the regressor with the same number of dimensions as the original target. By kryggird. #31563
sklearn.decomposition
#
Fix Add input checks to the
inverse_transform
method ofdecomposition.PCA
anddecomposition.IncrementalPCA
. #29310 by Ian Faust. #29310
sklearn.ensemble
#
Fix
ensemble.BaggingClassifier
,ensemble.BaggingRegressor
andensemble.IsolationForest
now usesample_weight
to draw the samples instead of forwarding them multiplied by a uniformly sampled mask to the underlying estimators. Furthermore,max_samples
is now interpreted as a fraction ofsample_weight.sum()
instead ofX.shape[0]
when passed as a float. By Antoine Baker. #31414
sklearn.feature_extraction
#
Fix Set the tag
requires_fit=False
for the classesfeature_extraction.FeatureHasher
andfeature_extraction.HashingVectorizer
. By hakan çanakcı. #31851
sklearn.gaussian_process
#
Efficiency make
GaussianProcessRegressor.predict
faster whenreturn_cov
andreturn_std
are bothFalse
. By Rafael Ayllón Gavilán. #31431
sklearn.linear_model
#
Enhancement class:
linear_model:ElasticNet
and class:linear_model:Lasso
withprecompute=False
use less memory for denseX
and are a bit faster. Previously, they used twice the memory ofX
even for Fortran-contiguousX
. By Christian Lorentzen #31665Enhancement
linear_model.ElasticNet
andlinear_model.Lasso
avoid double input checking and are therefore a bit faster. By Christian Lorentzen. #31848API Change
linear_model.SGDClassifier
,linear_model.SGDRegressor
, andlinear_model.SGDOneClassSVM
now deprecate negative values for thepower_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 #31474
sklearn.metrics
#
Feature
metrics.d2_brier_score
has been added which calculates the D^2 for the Brier score. By Omar Salman. #28971Enhancement
metrics.median_absolute_error
now supports Array API compatible inputs. By Lucy Liu. #31406Fix
metrics.median_absolute_error
now uses_averaged_weighted_percentile
instead of_weighted_percentile
to calculate median whensample_weight
is notNone
. This is equivalent to using the “averaged_inverted_cdf” instead of the “inverted_cdf” quantile method, which gives results equivalent tonumpy.median
if equal weights used. By Lucy Liu #30787Fix
y_pred
is deprecated in favour ofy_score
inmetrics.DetCurveDisplay.from_predictions
andmetrics.PrecisionRecallDisplay.from_predictions
.y_pred
will be removed in v1.10. By Luis #31764
- Fix - Additional
sample_weight
checking 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
andmetrics.zero_one_loss
.sample_weight
can only be 1D, consistent toy_true
andy_pred
in length,and all values must be finite and not complex. By Lucy Liu. #31701
sklearn.multiclass
#
Fix Fix tie-breaking behavior in
multiclass.OneVsRestClassifier
to matchnp.argmax
tie-breaking behavior. By Lakshmi Krishnan. #15504
sklearn.pipeline
#
Fix
pipeline.FeatureUnion
now validates that all transformers return 2D outputs and raises an informative error when transformers return 1D outputs, preventing silent failures that previously produced meaningless concatenated results. By gguiomar. #31559
sklearn.preprocessing
#
Enhancement
preprocessing.SplineTransformer
can now handle missing values with the parameterhandle_missing
. By Stefanie Senger. #28043Enhancement
preprocessing.MaxAbsScaler
can now clip out-of-range values in held-out data with the parameterclip
. By Hleb Levitski. #31790
Code and documentation contributors
Thanks to everyone who has contributed to the maintenance and improvement of the project since version 1.7, including:
TODO: update at the time of the release.