版本 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 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.
版本 1.6.0#
开发中
支持数组 API#
- 更多的估计器和函数已更新,以包含对所有符合
数组 API 的输入的支持。
详情请参阅 数组 API 支持(实验性) 。
函数:
sklearn.metrics.cluster.entropy#29141 由 Yaroslav Korobko 贡献;sklearn.metrics.mean_absolute_error#27736 由 Edoardo Abati 贡献 以及 #29143 由 Tialo 和 Loïc Estève 贡献;sklearn.metrics.mean_squared_error#29142 由 Yaroslav Korobko 贡献;sklearn.metrics.mean_tweedie_deviance#28106 由 Thomas Li 贡献;sklearn.metrics.pairwise.additive_chi2_kernel#29144 由 Yaroslav Korobko 贡献;sklearn.metrics.pairwise.chi2_kernel#29267 由 Yaroslav Korobko 贡献;sklearn.metrics.pairwise.cosine_similarity#29014 由 Edoardo Abati 贡献;sklearn.metrics.pairwise.paired_cosine_distances#29112 由 Edoardo Abati 贡献。
类:
preprocessing.LabelEncoder现在支持兼容数组 API 的输入。 #27381 由 Omar Salman 贡献。model_selection.GridSearchCV,model_selection.RandomizedSearchCV,model_selection.HalvingGridSearchCV和model_selection.HalvingRandomSearchCV现在支持当它们的基估计器支持时,兼容数组API的输入。#27096 由 Tim Head 和 Olivier Grisel 贡献。
元数据路由#
以下模型现在在其一个或多个方法中支持元数据路由。更多详情请参阅 元数据路由用户指南 。
Feature
model_selection.learning_curve现在支持其估计器的fit方法以及其底层CV分割器和评分器的元数据路由。#28975 由 Stefanie Senger 贡献。Feature
ensemble.StackingClassifier和ensemble.StackingRegressor现在支持元数据路由,并通过其fit方法将**fit_params传递给底层估计器。#28701 由 Stefanie Senger 贡献。Feature
compose.TransformedTargetRegressor现在在其fit和predict方法中支持元数据路由,并将相应的参数路由到底层回归器。#29136 由 Omar Salman 贡献。
放弃对PyPy的官方支持#
由于维护资源有限和用户数量较少,官方已放弃对PyPy的支持。scikit-learn的某些部分可能仍然有效,但PyPy不再在scikit-learn的持续集成中进行测试。#29128 由 Loïc Estève 贡献。
变更日志#
sklearn.base#
Enhancement 添加了一个函数
base.is_clusterer,用于确定给定的估计器是否属于聚类器类别。 #28936 by Christian Veenhuis 。
sklearn.cluster#
API Change
cluster.Birch的copy参数在 1.6 版本中已弃用,并将在 1.8 版本中移除。该参数对估计器没有影响,因为它不会对输入数据进行原地操作。 #29124 by Yao Xiao 。
sklearn.discriminant_analysis#
Fix
discriminant_analysis.QuadraticDiscriminantAnalysis在存在共线变量的情况下将引发LinAlgWarning。可以使用reg_param属性来屏蔽这些错误。 #19731 by Alihan Zihna 。
sklearn.ensemble#
Efficiency 通过并行化初始搜索 bin 阈值,改进了
ensemble.HistGradientBoostingClassifier和ensemble.HistGradientBoostingRegressor的拟合运行时性能。 #28064 by Christian Lorentzen 。Efficiency
ensemble.IsolationForest在 predict 期间现在可以并行运行作业,使用joblib在样本大小大于 2000 时提供高达 2-4 倍的加速。 #28622 by Adam Li 和 Sérgio Pereira 。
sklearn.impute#
Fix
impute.KNNImputer在计算均匀权重的均值时排除了距离为 nan 的样本。 #29135 by Xuefeng Xu 。
sklearn.linear_model#
API Change 弃用
linear_model.TheilSenRegressor中的copy_X参数,因为该参数没有效果。copy_X将在 1.8 版本中移除。 #29105 由 Adam Li 提交。
sklearn.manifold#
Efficiency
manifold.locally_linear_embedding和manifold.LocallyLinearEmbedding现在更有效地分配 Hessian、Modified 和 LTSA 方法中稀疏矩阵的内存。 #28096 由 Giorgio Angelotti 提交。
sklearn.metrics#
Enhancement
sklearn.metrics.check_scoring现在接受raise_exc参数,用于指定在多指标评分中部分评分器失败时是否引发异常或返回错误代码。 #28992 由 Stefanie Senger 提交。Enhancement 在
cohen_kappa_score中添加zero_division参数。当出现除以零的情况时,该指标未定义,将返回此值。 #29210 由 Marc Torrellas Socastro 和 Stefanie Senger 提交。
sklearn.model_selection#
Enhancement 在
model_selection.FixedThresholdClassifier中添加prefit参数,允许使用预先拟合的估计器而无需重新拟合。 #29067 由 Guillaume Lemaitre 提交。
sklearn.neighbors#
Fix
neighbors.LocalOutlierFactor在fit方法中当训练数据中存在重复值导致异常检测不准确时会发出警告。 #28773 由 Henrique Caroço 提交。
感谢自 1.5 版本以来为项目的维护和改进做出贡献的所有人,包括:
TODO: 在发布时更新。