版本 1.2#

有关此版本主要亮点简要描述,请参阅 scikit-learn 1.2 版本发布亮点

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.2.2#

2023年3月

更新日志#

sklearn.base#

sklearn.calibration#

sklearn.cluster#

sklearn.compose#

sklearn.ensemble#

sklearn.feature_selection#

#25664Jérémie du Boisberranger 提交。

sklearn.inspection#

sklearn.isotonic#

sklearn.preprocessing#

  • Fix preprocessing.OneHotEncoder.drop_idx_ 现在在存在不频繁类别时正确引用 categories_ 属性中的被删除类别。#25589Thomas Fan 提交。

  • Fix preprocessing.OrdinalEncoder 现在正确支持 encoded_missing_valueunknown_value 设置为类别基数,当训练数据中存在缺失值时。#25704Thomas Fan 提交。

sklearn.tree#

sklearn.utils#

版本 1.2.1#

2023年1月

更改的模型#

以下估计器和函数,在相同数据和参数下拟合时,可能会产生与上一版本不同的模型。这通常是由于建模逻辑的变化(错误修复或增强)或随机抽样过程的变化引起的。

影响所有模块的更改#

  • Fix 支持分类器和回归器的 pandas.Int64 类型的 y#25089Tim Head 贡献。

  • Fix 移除内部使用邻居搜索方法的估计器的虚假警告。 #25129Julien Jerphanion 贡献。

  • Fix 修复了一个错误,该错误导致在使用 n_jobs > 1 的估计器中忽略了当前配置。此错误在 joblib 的辅助线程分派的任务中触发,因为 sklearn.get_config 曾经访问一个空的线程本地配置,而不是从首次调用 joblib.Parallel 的线程中可见的配置。 #25363Guillaume Lemaitre 贡献。

变更日志#

sklearn.base#

  • Fix 修复了 BaseEstimator.__getstate__ 中的回归问题,该问题会阻止某些估计器在 Python 3.11 中被序列化。 #25188Benjamin Bossan 贡献。

  • Fix 继承自 base.TransformerMixin 时,仅当类本身定义了 transform 方法时才会包装 transform 方法。#25295Thomas Fan 提交。

sklearn.datasets#

sklearn.decomposition#

sklearn.ensemble#

sklearn.feature_extraction#

sklearn.linear_model#

sklearn.manifold#

sklearn.model_selection#

sklearn.neural_network#

sklearn.preprocessing#

sklearn.tree#

sklearn.utils#

版本 1.2.0#

2022年12月

更改的模型#

以下估计器和函数,在相同数据和参数下拟合时,可能会产生与上一版本不同的模型。这通常是由于建模逻辑的变化(错误修复或增强),或随机抽样过程的变化。

影响所有模块的更改#

变更日志#

sklearn.base#

sklearn.calibration#

sklearn.cluster#

cluster.AgglomerativeClustering 将在 v1.4 中重命名为 metric#23470Meekail Zain 提交。

sklearn.datasets#

sklearn.decomposition#

支持 svdeighwhiten_solver 默认设置为 svd ,尽管在 num_features > num_samples 的情况下, eigh 可能更快且更节省内存。 #11860Pierre Ablin 提交, #22527Meekail ZainThomas Fan 提交。

sklearn.discriminant_analysis#

sklearn.ensemble#

sklearn.feature_selection#

sklearn.gaussian_process#

sklearn.impute#

sklearn.inspection#

sklearn.kernel_approximation#

numpy.float32 输入的 dtype。#24350Rahil Parikh 贡献。

sklearn.linear_model#

linear_model.SGDRegressorlinear_model.SGDClassifier 。 同时相应地更新了早期停止的条件。 #23798Harsh Agrawal 提交。

sklearn.manifold#

manifold.MDSmanifold.smacof 。请注意, normalized_stress 仅对非度量 MDS 有效,因此当 metric=False 时, "auto" 选项启用 normalized_stress ,而当 metric=True 时禁用它。在版本 1.4 中, "auto" 将成为 normalized_stress 的默认值。#23834Meekail Zain 提交。

sklearn.metrics#

sklearn.model_selection#

sklearn.multioutput#

sklearn.naive_bayes#

sklearn.neighbors#

sklearn.neural_network#

sklearn.pipeline#

sklearn.preprocessing#

sklearn.svm#

sklearn.tree#

sklearn.utils#

正确处理 requires_positive_X 标签。#24667Thomas Fan 提交。

代码和文档贡献者

感谢自 1.1 版本以来为项目的维护和改进做出贡献的每一个人,包括:

2357juan, 3lLobo, Adam J. Stewart, Adam Kania, Adam Li, Aditya Anulekh, Admir Demiraj, adoublet, Adrin Jalali, Ahmedbgh, Aiko, Akshita Prasanth, Ala-Na, Alessandro Miola, Alex, Alexandr, Alexandre Perez-Lebel, Alex Buzenet, Ali H. El-Kassas, aman kumar, Amit Bera, András Simon, Andreas Grivas, Andreas Mueller, Andrew Wang, angela-maennel, Aniket Shirsat, Anthony22-dev, Antony Lee, anupam, Apostolos Tsetoglou, Aravindh R, Artur Hermano, Arturo Amor, as-90, ashah002, Ashwin Mathur, avm19, Azaria Gebremichael, b0rxington, Badr MOUFAD, Bardiya Ak, Bartłomiej Gońda, BdeGraaff, Benjamin Bossan, Benjamin Carter, berkecanrizai, Bernd Fritzke, Bhoomika, Biswaroop Mitra, Brandon TH Chen, Brett Cannon, Bsh, cache-missing, carlo, Carlos Ramos Carreño, ceh, chalulu, Changyao Chen, Charles Zablit, Chiara Marmo, Christian Lorentzen, Christian Ritter, Christian Veenhuis, christianwaldmann, Christine P. Chai, Claudio Salvatore Arcidiacono, Clément Verrier, crispinlogan, Da-Lan, DanGonite57, Daniela Fernandes, DanielGaerber, darioka, Darren Nguyen, davidblnc, david-cortes, David Gilbertson, David Poznik, Dayne, Dea María Léon, Denis, Dev Khant, Dhanshree Arora, Diadochokinetic, diederikwp, Dimitri Papadopoulos Orfanos, Dimitris Litsidis, drewhogg, Duarte OC, Dwight Lindquist, Eden Brekke, Edern, Edoardo Abati, Eleanore Denies, EliaSchiavon, Emir, ErmolaevPA, Fabrizio Damicelli, fcharras, Felipe Siola, Flynn, francesco-tuveri, Franck Charras, ftorres16, Gael Varoquaux, Geevarghese George, genvalen, GeorgiaMayDay, Gianr Lazz, Gleb Levitski, Glòria Macià Muñoz, Guillaume Lemaitre, Guillem García Subies, Guitared, gunesbayir, Haesun Park, Hansin Ahuja, Hao Chun Chang, Harsh Agrawal, harshit5674, hasan-yaman, henrymooresc, Henry Sorsky, Hristo Vrigazov, htsedebenham, humahn, i-aki-y, Ian Thompson, Ido M, Iglesys, Iliya Zhechev, Irene, ivanllt, Ivan Sedykh, Jack McIvor, jakirkham, JanFidor, Jason G, Jérémie du Boisberranger, Jiten Sidhpura, jkarolczak, João David, JohnathanPi, John Koumentis, John P, John Pangas, johnthagen, Jordan Fleming, Joshua Choo Yun Keat, Jovan Stojanovic, Juan Carlos Alfaro Jiménez, juanfe88, Juan Felipe Arias, JuliaSchoepp, Julien Jerphanion, jygerardy, ka00ri, Kanishk Sachdev, Kanissh, Kaushik Amar Das, Kendall, Kenneth Prabakaran, Kento Nozawa, kernc, Kevin Roice, Kian Eliasi, Kilian Kluge, Kilian Lieret, Kirandevraj, Kraig, krishna kumar, krishna vamsi, Kshitij Kapadni, Kshitij Mathur, Lauren Burke, Léonard Binet, lingyi1110, Lisa Casino, Logan Thomas, Loic Esteve, Luciano Mantovani, Lucy Liu, Maascha, Madhura Jayaratne, madinak, Maksym, Malte S. Kurz, Mansi Agrawal, Marco Edward Gorelli, Marco Wurps, Maren Westermann, Maria Telenczuk, Mario Kostelac, martin-kokos, Marvin Krawutschke, Masanori Kanazu, mathurinm, Matt Haberland, mauroantonioserrano, Max Halford, Maxi Marufo, maximeSaur, Maxim Smolskiy, Maxwell, m. bou, Meekail Zain, Mehgarg, mehmetcanakbay, Mia Bajić, Michael Flaks, Michael Hornstein, Michel de Ruiter, Michelle Paradis, Mikhail Iljin, Misa Ogura, Moritz Wilksch, mrastgoo, Naipawat Poolsawat, Naoise Holohan, Nass, Nathan Jacobi, Nawazish Alam, Nguyễn Văn Diễn, Nicola Fanelli, Nihal Thukarama Rao, Nikita Jare, nima10khodaveisi, Nima Sarajpoor, nitinramvelraj, NNLNR, npache, Nwanna-Joseph, Nymark Kho, o-holman, Olivier Grisel, Olle Lukowski, Omar Hassoun, Omar Salman, osman tamer, ouss1508, Oyindamola Olatunji, PAB, Pandata, partev, Paulo Sergio Soares, Petar Mlinarić, Peter Jansson, Peter Steinbach, Philipp Jung, Piet Brömmel, Pooja M, Pooja Subramaniam, priyam kakati, puhuk, Rachel Freeland, Rachit Keerti Das, Rafal Wojdyla, Raghuveer Bhat, Rahil Parikh, Ralf Gommers, ram vikram singh, Ravi Makhija, Rehan Guha, Reshama Shaikh, Richard Klima, Rob Crockett, Robert Hommes, Robert Juergens, Robin Lenz, Rocco Meli, Roman4oo, Ross Barnowski, Rowan Mankoo, Rudresh Veerkhare, Rushil Desai, Sabri Monaf Sabri, Safikh, Safiuddin Khaja, Salahuddin, Sam Adam Day, Sandra Yojana Meneses, Sandro Ephrem, Sangam, SangamSwadik, SANJAI_3, SarahRemus, Sashka Warner, SavkoMax, Scott Gigante, Scott Gustafson, Sean Atukorala, sec65, SELEE, seljaks, Shady el Gewily, Shane, shellyfung, Shinsuke Mori, Shiva chauhan, Shoaib Khan, Shogo Hida, Shrankhla Srivastava, Shuangchi He, Simon, sonnivs, Sortofamudkip, Srinath Kailasa, Stanislav (Stanley) Modrak, Stefanie Molin, stellalin7, Stéphane Collot, Steven Van Vaerenbergh, Steve Schmerler, Sven Stehle, Tabea Kossen, TheDevPanda, the-syd-sre, Thijs van Weezel, Thomas Bonald, Thomas Germer, Thomas J. Fan, Ti-Ion, Tim Head, Timofei Kornev, toastedyeast, Tobias Pitters, Tom Dupré la Tour, tomiock, Tom Mathews, Tom McTiernan, tspeng, Tyler Egashira, Valentin Laurent, Varun Jain, Vera Komeyer, Vicente Reyes-Puerta, Vinayak Mehta, Vincent M, Vishal, Vyom Pathak, wattai, wchathura, WEN Hao, William M, x110, Xiao Yuan, Xunius, yanhong-zhao-ef, Yusuf Raji, Z Adil Khwaja, zeeshan lone