-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathv1.2.html
1361 lines (1327 loc) · 207 KB
/
v1.2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<meta property="og:title" content="Version 1.2.2" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://scikit-learn/stable/whats_new/v1.2.html" />
<meta property="og:site_name" content="scikit-learn" />
<meta property="og:description" content="March 2023 Changelog: sklearn.base: When set_output(transform="pandas"), base.TransformerMixin maintains the index if the transform output is already a DataFrame.#25747 by Thomas Fan.. sklearn.cali..." />
<meta property="og:image" content="https://scikit-learn.org/stable/_static/scikit-learn-logo-small.png" />
<meta property="og:image:alt" content="scikit-learn" />
<meta name="description" content="March 2023 Changelog: sklearn.base: When set_output(transform="pandas"), base.TransformerMixin maintains the index if the transform output is already a DataFrame.#25747 by Thomas Fan.. sklearn.cali..." />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Version 1.2.2 — scikit-learn 1.2.2 documentation</title>
<link rel="canonical" href="http://scikit-learn.org/stable/whats_new/v1.2.html" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="stylesheet" href="../_static/css/vendor/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/plot_directive.css" type="text/css" />
<link rel="stylesheet" href="../_static/sg_gallery.css" type="text/css" />
<link rel="stylesheet" href="../_static/sg_gallery-binder.css" type="text/css" />
<link rel="stylesheet" href="../_static/sg_gallery-dataframe.css" type="text/css" />
<link rel="stylesheet" href="../_static/sg_gallery-rendered-html.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/js/vendor/jquery-3.6.3.slim.min.js"></script>
</head>
<body>
<nav id="navbar" class="sk-docs-navbar navbar navbar-expand-md navbar-light bg-light py-0">
<div class="container-fluid sk-docs-container px-0">
<a class="navbar-brand py-0" href="../index.html">
<img
class="sk-brand-img"
src="../_static/scikit-learn-logo-small.png"
alt="logo"/>
</a>
<button
id="sk-navbar-toggler"
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="sk-navbar-collapse collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="sk-nav-link nav-link" href="../install.html">Install</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link" href="../user_guide.html">User Guide</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link" href="../modules/classes.html">API</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link" href="../auto_examples/index.html">Examples</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link" target="_blank" rel="noopener noreferrer" href="https://blog.scikit-learn.org/">Community</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../getting_started.html" >Getting Started</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../tutorial/index.html" >Tutorial</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="#" >What's new</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../glossary.html" >Glossary</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://scikit-learn.org/dev/developers/index.html" target="_blank" rel="noopener noreferrer">Development</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../faq.html" >FAQ</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../support.html" >Support</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../related_projects.html" >Related packages</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../roadmap.html" >Roadmap</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../governance.html" >Governance</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../about.html" >About us</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://github.com/scikit-learn/scikit-learn" >GitHub</a>
</li>
<li class="nav-item">
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://scikit-learn.org/dev/versions.html" >Other Versions and Download</a>
</li>
<li class="nav-item dropdown nav-more-item-dropdown">
<a class="sk-nav-link nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">More</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="sk-nav-dropdown-item dropdown-item" href="../getting_started.html" >Getting Started</a>
<a class="sk-nav-dropdown-item dropdown-item" href="../tutorial/index.html" >Tutorial</a>
<a class="sk-nav-dropdown-item dropdown-item" href="#" >What's new</a>
<a class="sk-nav-dropdown-item dropdown-item" href="../glossary.html" >Glossary</a>
<a class="sk-nav-dropdown-item dropdown-item" href="https://scikit-learn.org/dev/developers/index.html" target="_blank" rel="noopener noreferrer">Development</a>
<a class="sk-nav-dropdown-item dropdown-item" href="../faq.html" >FAQ</a>
<a class="sk-nav-dropdown-item dropdown-item" href="../support.html" >Support</a>
<a class="sk-nav-dropdown-item dropdown-item" href="../related_projects.html" >Related packages</a>
<a class="sk-nav-dropdown-item dropdown-item" href="../roadmap.html" >Roadmap</a>
<a class="sk-nav-dropdown-item dropdown-item" href="../governance.html" >Governance</a>
<a class="sk-nav-dropdown-item dropdown-item" href="../about.html" >About us</a>
<a class="sk-nav-dropdown-item dropdown-item" href="https://github.com/scikit-learn/scikit-learn" >GitHub</a>
<a class="sk-nav-dropdown-item dropdown-item" href="https://scikit-learn.org/dev/versions.html" >Other Versions and Download</a>
</div>
</li>
</ul>
<div id="searchbox" role="search">
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input class="sk-search-text-input" type="text" name="q" aria-labelledby="searchlabel" />
<input class="sk-search-text-btn" type="submit" value="Go" />
</form>
</div>
</div>
</div>
</div>
</nav>
<div class="d-flex" id="sk-doc-wrapper">
<input type="checkbox" name="sk-toggle-checkbox" id="sk-toggle-checkbox">
<label id="sk-sidemenu-toggle" class="sk-btn-toggle-toc btn sk-btn-primary" for="sk-toggle-checkbox">Toggle Menu</label>
<div id="sk-sidebar-wrapper" class="border-right">
<div class="sk-sidebar-toc-wrapper">
<div class="btn-group w-100 mb-2" role="group" aria-label="rellinks">
<a href="../whats_new.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Release History">Prev</a><a href="../whats_new.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Release History">Up</a>
<a href="v1.1.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Version 1.1.3">Next</a>
</div>
<div class="alert alert-danger p-1 mb-2" role="alert">
<p class="text-center mb-0">
<strong>scikit-learn 1.2.2</strong><br/>
<a href="http://scikit-learn.org/dev/versions.html">Other versions</a>
</p>
</div>
<div class="alert alert-warning p-1 mb-2" role="alert">
<p class="text-center mb-0">
Please <a class="font-weight-bold" href="../about.html#citing-scikit-learn"><string>cite us</string></a> if you use the software.
</p>
</div>
<div class="sk-sidebar-toc">
<ul>
<li><a class="reference internal" href="#">Version 1.2.2</a><ul>
<li><a class="reference internal" href="#changelog">Changelog</a><ul>
<li><a class="reference internal" href="#sklearn-base"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.base</span></code></a></li>
<li><a class="reference internal" href="#sklearn-calibration"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.calibration</span></code></a></li>
<li><a class="reference internal" href="#sklearn-cluster"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a></li>
<li><a class="reference internal" href="#sklearn-compose"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a></li>
<li><a class="reference internal" href="#sklearn-ensemble"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a></li>
<li><a class="reference internal" href="#sklearn-feature-selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_selection</span></code></a></li>
<li><a class="reference internal" href="#sklearn-inspection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.inspection</span></code></a></li>
<li><a class="reference internal" href="#sklearn-isotonic"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.isotonic</span></code></a></li>
<li><a class="reference internal" href="#sklearn-preprocessing"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a></li>
<li><a class="reference internal" href="#sklearn-tree"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.tree</span></code></a></li>
<li><a class="reference internal" href="#sklearn-utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#version-1-2-1">Version 1.2.1</a><ul>
<li><a class="reference internal" href="#changed-models">Changed models</a></li>
<li><a class="reference internal" href="#changes-impacting-all-modules">Changes impacting all modules</a></li>
<li><a class="reference internal" href="#id1">Changelog</a><ul>
<li><a class="reference internal" href="#id2"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.base</span></code></a></li>
<li><a class="reference internal" href="#sklearn-datasets"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a></li>
<li><a class="reference internal" href="#sklearn-decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a></li>
<li><a class="reference internal" href="#id3"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a></li>
<li><a class="reference internal" href="#sklearn-feature-extraction"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_extraction</span></code></a></li>
<li><a class="reference internal" href="#sklearn-linear-model"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a></li>
<li><a class="reference internal" href="#sklearn-manifold"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.manifold</span></code></a></li>
<li><a class="reference internal" href="#sklearn-model-selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a></li>
<li><a class="reference internal" href="#sklearn-neural-network"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neural_network</span></code></a></li>
<li><a class="reference internal" href="#id4"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a></li>
<li><a class="reference internal" href="#id5"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.tree</span></code></a></li>
<li><a class="reference internal" href="#id6"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#version-1-2-0">Version 1.2.0</a><ul>
<li><a class="reference internal" href="#legend-for-changelogs">Legend for changelogs</a></li>
<li><a class="reference internal" href="#id7">Changed models</a></li>
<li><a class="reference internal" href="#id8">Changes impacting all modules</a></li>
<li><a class="reference internal" href="#id9">Changelog</a><ul>
<li><a class="reference internal" href="#id10"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.base</span></code></a></li>
<li><a class="reference internal" href="#id11"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.calibration</span></code></a></li>
<li><a class="reference internal" href="#id12"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a></li>
<li><a class="reference internal" href="#id13"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a></li>
<li><a class="reference internal" href="#id14"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a></li>
<li><a class="reference internal" href="#sklearn-discriminant-analysis"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.discriminant_analysis</span></code></a></li>
<li><a class="reference internal" href="#id15"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a></li>
<li><a class="reference internal" href="#id16"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_selection</span></code></a></li>
<li><a class="reference internal" href="#sklearn-gaussian-process"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.gaussian_process</span></code></a></li>
<li><a class="reference internal" href="#sklearn-impute"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.impute</span></code></a></li>
<li><a class="reference internal" href="#id17"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.inspection</span></code></a></li>
<li><a class="reference internal" href="#sklearn-kernel-approximation"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.kernel_approximation</span></code></a></li>
<li><a class="reference internal" href="#id18"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a></li>
<li><a class="reference internal" href="#id19"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.manifold</span></code></a></li>
<li><a class="reference internal" href="#sklearn-metrics"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a></li>
<li><a class="reference internal" href="#id20"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a></li>
<li><a class="reference internal" href="#sklearn-multioutput"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.multioutput</span></code></a></li>
<li><a class="reference internal" href="#sklearn-naive-bayes"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.naive_bayes</span></code></a></li>
<li><a class="reference internal" href="#sklearn-neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a></li>
<li><a class="reference internal" href="#id21"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neural_network</span></code></a></li>
<li><a class="reference internal" href="#sklearn-pipeline"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.pipeline</span></code></a></li>
<li><a class="reference internal" href="#id22"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a></li>
<li><a class="reference internal" href="#sklearn-svm"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.svm</span></code></a></li>
<li><a class="reference internal" href="#id23"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.tree</span></code></a></li>
<li><a class="reference internal" href="#id24"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#code-and-documentation-contributors">Code and Documentation Contributors</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div id="sk-page-content-wrapper">
<div class="sk-page-content container-fluid body px-md-3" role="main">
<section id="version-1-2-2">
<span id="changes-1-2-2"></span><h1>Version 1.2.2<a class="headerlink" href="#version-1-2-2" title="Permalink to this heading">¶</a></h1>
<p><strong>March 2023</strong></p>
<section id="changelog">
<h2>Changelog<a class="headerlink" href="#changelog" title="Permalink to this heading">¶</a></h2>
<section id="sklearn-base">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.base" title="sklearn.base"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.base</span></code></a><a class="headerlink" href="#sklearn-base" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> When <code class="docutils literal notranslate"><span class="pre">set_output(transform="pandas")</span></code>, <a class="reference internal" href="../modules/generated/sklearn.base.TransformerMixin.html#sklearn.base.TransformerMixin" title="sklearn.base.TransformerMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">base.TransformerMixin</span></code></a> maintains
the index if the <a class="reference internal" href="../glossary.html#term-transform"><span class="xref std std-term">transform</span></a> output is already a DataFrame. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25747">#25747</a> by
<a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</section>
<section id="sklearn-calibration">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.calibration" title="sklearn.calibration"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.calibration</span></code></a><a class="headerlink" href="#sklearn-calibration" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> A deprecation warning is raised when using the <code class="docutils literal notranslate"><span class="pre">base_estimator__</span></code> prefix to
set parameters of the estimator used in <a class="reference internal" href="../modules/generated/sklearn.calibration.CalibratedClassifierCV.html#sklearn.calibration.CalibratedClassifierCV" title="sklearn.calibration.CalibratedClassifierCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">calibration.CalibratedClassifierCV</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25477">#25477</a> by <a class="reference external" href="https://github.com/betatim">Tim Head</a>.</p></li>
</ul>
</section>
<section id="sklearn-cluster">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.cluster" title="sklearn.cluster"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a><a class="headerlink" href="#sklearn-cluster" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.cluster.BisectingKMeans.html#sklearn.cluster.BisectingKMeans" title="sklearn.cluster.BisectingKMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.BisectingKMeans</span></code></a>, preventing <code class="docutils literal notranslate"><span class="pre">fit</span></code> to randomly
fail due to a permutation of the labels when running multiple inits.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25563">#25563</a> by <a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
</ul>
</section>
<section id="sklearn-compose">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.compose" title="sklearn.compose"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.compose</span></code></a><a class="headerlink" href="#sklearn-compose" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fixes a bug in <a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.ColumnTransformer</span></code></a> which now supports
empty selection of columns when <code class="docutils literal notranslate"><span class="pre">set_output(transform="pandas")</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25570">#25570</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</section>
<section id="sklearn-ensemble">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.ensemble" title="sklearn.ensemble"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a><a class="headerlink" href="#sklearn-ensemble" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> A deprecation warning is raised when using the <code class="docutils literal notranslate"><span class="pre">base_estimator__</span></code> prefix
to set parameters of the estimator used in <a class="reference internal" href="../modules/generated/sklearn.ensemble.AdaBoostClassifier.html#sklearn.ensemble.AdaBoostClassifier" title="sklearn.ensemble.AdaBoostClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.AdaBoostClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.AdaBoostRegressor.html#sklearn.ensemble.AdaBoostRegressor" title="sklearn.ensemble.AdaBoostRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.AdaBoostRegressor</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingClassifier.html#sklearn.ensemble.BaggingClassifier" title="sklearn.ensemble.BaggingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingClassifier</span></code></a>,
and <a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingRegressor.html#sklearn.ensemble.BaggingRegressor" title="sklearn.ensemble.BaggingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingRegressor</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25477">#25477</a> by <a class="reference external" href="https://github.com/betatim">Tim Head</a>.</p></li>
</ul>
</section>
<section id="sklearn-feature-selection">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.feature_selection" title="sklearn.feature_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_selection</span></code></a><a class="headerlink" href="#sklearn-feature-selection" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fixed a regression where a negative <code class="docutils literal notranslate"><span class="pre">tol</span></code> would not be accepted any more by
<a class="reference internal" href="../modules/generated/sklearn.feature_selection.SequentialFeatureSelector.html#sklearn.feature_selection.SequentialFeatureSelector" title="sklearn.feature_selection.SequentialFeatureSelector"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_selection.SequentialFeatureSelector</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25664">#25664</a> by <a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
</ul>
</section>
<section id="sklearn-inspection">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.inspection" title="sklearn.inspection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.inspection</span></code></a><a class="headerlink" href="#sklearn-inspection" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Raise a more informative error message in <a class="reference internal" href="../modules/generated/sklearn.inspection.partial_dependence.html#sklearn.inspection.partial_dependence" title="sklearn.inspection.partial_dependence"><code class="xref py py-func docutils literal notranslate"><span class="pre">inspection.partial_dependence</span></code></a>
when dealing with mixed data type categories that cannot be sorted by
<a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.unique.html#numpy.unique" title="(in NumPy v1.24)"><code class="xref py py-func docutils literal notranslate"><span class="pre">numpy.unique</span></code></a>. This problem usually happen when categories are <code class="docutils literal notranslate"><span class="pre">str</span></code> and
missing values are present using <code class="docutils literal notranslate"><span class="pre">np.nan</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25774">#25774</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</section>
<section id="sklearn-isotonic">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.isotonic" title="sklearn.isotonic"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.isotonic</span></code></a><a class="headerlink" href="#sklearn-isotonic" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fixes a bug in <a class="reference internal" href="../modules/generated/sklearn.isotonic.IsotonicRegression.html#sklearn.isotonic.IsotonicRegression" title="sklearn.isotonic.IsotonicRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">isotonic.IsotonicRegression</span></code></a> where
<a class="reference internal" href="../modules/generated/sklearn.isotonic.IsotonicRegression.html#sklearn.isotonic.IsotonicRegression.predict" title="sklearn.isotonic.IsotonicRegression.predict"><code class="xref py py-meth docutils literal notranslate"><span class="pre">isotonic.IsotonicRegression.predict</span></code></a> would return a pandas DataFrame
when the global configuration sets <code class="docutils literal notranslate"><span class="pre">transform_output="pandas"</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25500">#25500</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</section>
<section id="sklearn-preprocessing">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.preprocessing" title="sklearn.preprocessing"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a><a class="headerlink" href="#sklearn-preprocessing" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <code class="xref py py-attr docutils literal notranslate"><span class="pre">preprocessing.OneHotEncoder.drop_idx_</span></code> now properly
references the dropped category in the <code class="docutils literal notranslate"><span class="pre">categories_</span></code> attribute
when there are infrequent categories. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25589">#25589</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.preprocessing.OrdinalEncoder.html#sklearn.preprocessing.OrdinalEncoder" title="sklearn.preprocessing.OrdinalEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OrdinalEncoder</span></code></a> now correctly supports
<code class="docutils literal notranslate"><span class="pre">encoded_missing_value</span></code> or <code class="docutils literal notranslate"><span class="pre">unknown_value</span></code> set to a categories’ cardinality
when there is missing values in the training data. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25704">#25704</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</section>
<section id="sklearn-tree">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.tree" title="sklearn.tree"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.tree</span></code></a><a class="headerlink" href="#sklearn-tree" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fixed a regression in <a class="reference internal" href="../modules/generated/sklearn.tree.DecisionTreeClassifier.html#sklearn.tree.DecisionTreeClassifier" title="sklearn.tree.DecisionTreeClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.DecisionTreeClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.tree.DecisionTreeRegressor.html#sklearn.tree.DecisionTreeRegressor" title="sklearn.tree.DecisionTreeRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.DecisionTreeRegressor</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.tree.ExtraTreeClassifier.html#sklearn.tree.ExtraTreeClassifier" title="sklearn.tree.ExtraTreeClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.ExtraTreeClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.tree.ExtraTreeRegressor.html#sklearn.tree.ExtraTreeRegressor" title="sklearn.tree.ExtraTreeRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.ExtraTreeRegressor</span></code></a> where an error was no longer raised in version
1.2 when <code class="docutils literal notranslate"><span class="pre">min_sample_split=1</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25744">#25744</a> by <a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
</ul>
</section>
<section id="sklearn-utils">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.utils" title="sklearn.utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a><a class="headerlink" href="#sklearn-utils" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fixes a bug in <a class="reference internal" href="../modules/generated/sklearn.utils.check_array.html#sklearn.utils.check_array" title="sklearn.utils.check_array"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.check_array</span></code></a> which now correctly performs
non-finite validation with the Array API specification. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25619">#25619</a> by
<a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.utils.multiclass.type_of_target.html#sklearn.utils.multiclass.type_of_target" title="sklearn.utils.multiclass.type_of_target"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.multiclass.type_of_target</span></code></a> can identify pandas
nullable data types as classification targets. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25638">#25638</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</section>
</section>
</section>
<section id="version-1-2-1">
<span id="changes-1-2-1"></span><h1>Version 1.2.1<a class="headerlink" href="#version-1-2-1" title="Permalink to this heading">¶</a></h1>
<p><strong>January 2023</strong></p>
<section id="changed-models">
<h2>Changed models<a class="headerlink" href="#changed-models" title="Permalink to this heading">¶</a></h2>
<p>The following estimators and functions, when fit with the same data and
parameters, may produce different models from the previous version. This often
occurs due to changes in the modelling logic (bug fixes or enhancements), or in
random sampling procedures.</p>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> The fitted components in <code class="xref py py-class docutils literal notranslate"><span class="pre">MiniBatchDictionaryLearning</span></code> might differ. The
online updates of the sufficient statistics now properly take the sizes of the batches
into account.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25354">#25354</a> by <a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> The <code class="docutils literal notranslate"><span class="pre">categories_</span></code> attribute of <a class="reference internal" href="../modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder" title="sklearn.preprocessing.OneHotEncoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.OneHotEncoder</span></code></a> now
always contains an array of <code class="docutils literal notranslate"><span class="pre">object`s</span> <span class="pre">when</span> <span class="pre">using</span> <span class="pre">predefined</span> <span class="pre">categories</span> <span class="pre">that</span>
<span class="pre">are</span> <span class="pre">strings.</span> <span class="pre">Predefined</span> <span class="pre">categories</span> <span class="pre">encoded</span> <span class="pre">as</span> <span class="pre">bytes</span> <span class="pre">will</span> <span class="pre">no</span> <span class="pre">longer</span> <span class="pre">work</span>
<span class="pre">with</span> <span class="pre">`X</span></code> encoded as strings. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25174">#25174</a> by <a class="reference external" href="https://github.com/betatim">Tim Head</a>.</p></li>
</ul>
</section>
<section id="changes-impacting-all-modules">
<h2>Changes impacting all modules<a class="headerlink" href="#changes-impacting-all-modules" title="Permalink to this heading">¶</a></h2>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Support <code class="docutils literal notranslate"><span class="pre">pandas.Int64</span></code> dtyped <code class="docutils literal notranslate"><span class="pre">y</span></code> for classifiers and regressors.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25089">#25089</a> by <a class="reference external" href="https://github.com/betatim">Tim Head</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Remove spurious warnings for estimators internally using neighbors search methods.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25129">#25129</a> by <a class="reference external" href="https://github.com/jjerphan">Julien Jerphanion</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fix a bug where the current configuration was ignored in estimators using
<code class="docutils literal notranslate"><span class="pre">n_jobs</span> <span class="pre">></span> <span class="pre">1</span></code>. This bug was triggered for tasks dispatched by the auxillary
thread of <code class="docutils literal notranslate"><span class="pre">joblib</span></code> as <a class="reference internal" href="../modules/generated/sklearn.get_config.html#sklearn.get_config" title="sklearn.get_config"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.get_config</span></code></a> used to access an empty thread
local configuration instead of the configuration visible from the thread where
<code class="docutils literal notranslate"><span class="pre">joblib.Parallel</span></code> was first called.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25363">#25363</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</section>
<section id="id1">
<h2>Changelog<a class="headerlink" href="#id1" title="Permalink to this heading">¶</a></h2>
<section id="id2">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.base" title="sklearn.base"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.base</span></code></a><a class="headerlink" href="#id2" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fix a regression in <code class="docutils literal notranslate"><span class="pre">BaseEstimator.__getstate__</span></code> that would prevent
certain estimators to be pickled when using Python 3.11. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25188">#25188</a> by
<a class="reference external" href="https://github.com/BenjaminBossan">Benjamin Bossan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Inheriting from <a class="reference internal" href="../modules/generated/sklearn.base.TransformerMixin.html#sklearn.base.TransformerMixin" title="sklearn.base.TransformerMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">base.TransformerMixin</span></code></a> will only wrap the <code class="docutils literal notranslate"><span class="pre">transform</span></code>
method if the class defines <code class="docutils literal notranslate"><span class="pre">transform</span></code> itself. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25295">#25295</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</section>
<section id="sklearn-datasets">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.datasets" title="sklearn.datasets"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a><a class="headerlink" href="#sklearn-datasets" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fixes an inconsistency in <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_openml.html#sklearn.datasets.fetch_openml" title="sklearn.datasets.fetch_openml"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_openml</span></code></a> between liac-arff
and pandas parser when a leading space is introduced after the delimiter.
The ARFF specs requires to ignore the leading space.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25312">#25312</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fixes a bug in <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_openml.html#sklearn.datasets.fetch_openml" title="sklearn.datasets.fetch_openml"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_openml</span></code></a> when using <code class="docutils literal notranslate"><span class="pre">parser="pandas"</span></code>
where single quote and backslash escape characters were not properly handled.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25511">#25511</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</section>
<section id="sklearn-decomposition">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.decomposition" title="sklearn.decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a><a class="headerlink" href="#sklearn-decomposition" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.decomposition.MiniBatchDictionaryLearning.html#sklearn.decomposition.MiniBatchDictionaryLearning" title="sklearn.decomposition.MiniBatchDictionaryLearning"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.MiniBatchDictionaryLearning</span></code></a> where the
online updates of the sufficient statistics where not correct when calling
<code class="docutils literal notranslate"><span class="pre">partial_fit</span></code> on batches of different sizes.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25354">#25354</a> by <a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.decomposition.DictionaryLearning.html#sklearn.decomposition.DictionaryLearning" title="sklearn.decomposition.DictionaryLearning"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.DictionaryLearning</span></code></a> better supports readonly NumPy
arrays. In particular, it better supports large datasets which are memory-mapped
when it is used with coordinate descent algorithms (i.e. when <code class="docutils literal notranslate"><span class="pre">fit_algorithm='cd'</span></code>).
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25172">#25172</a> by <a class="reference external" href="https://github.com/jjerphan">Julien Jerphanion</a>.</p></li>
</ul>
</section>
<section id="id3">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.ensemble" title="sklearn.ensemble"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a><a class="headerlink" href="#id3" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier" title="sklearn.ensemble.RandomForestClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomForestClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomForestRegressor.html#sklearn.ensemble.RandomForestRegressor" title="sklearn.ensemble.RandomForestRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomForestRegressor</span></code></a> <a class="reference internal" href="../modules/generated/sklearn.ensemble.ExtraTreesClassifier.html#sklearn.ensemble.ExtraTreesClassifier" title="sklearn.ensemble.ExtraTreesClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.ExtraTreesClassifier</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.ensemble.ExtraTreesRegressor.html#sklearn.ensemble.ExtraTreesRegressor" title="sklearn.ensemble.ExtraTreesRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.ExtraTreesRegressor</span></code></a> now support sparse readonly datasets.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25341">#25341</a> by <a class="reference external" href="https://github.com/jjerphan">Julien Jerphanion</a></p></li>
</ul>
</section>
<section id="sklearn-feature-extraction">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.feature_extraction" title="sklearn.feature_extraction"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_extraction</span></code></a><a class="headerlink" href="#sklearn-feature-extraction" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.feature_extraction.FeatureHasher.html#sklearn.feature_extraction.FeatureHasher" title="sklearn.feature_extraction.FeatureHasher"><code class="xref py py-class docutils literal notranslate"><span class="pre">feature_extraction.FeatureHasher</span></code></a> raises an informative error
when the input is a list of strings. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25094">#25094</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</section>
<section id="sklearn-linear-model">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.linear_model" title="sklearn.linear_model"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a><a class="headerlink" href="#sklearn-linear-model" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fix a regression in <a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier" title="sklearn.linear_model.SGDClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor" title="sklearn.linear_model.SGDRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDRegressor</span></code></a> that makes them unusable with the
<code class="docutils literal notranslate"><span class="pre">verbose</span></code> parameter set to a value greater than 0.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25250">#25250</a> by <a class="reference external" href="https://github.com/jeremiedbb">Jérémie Du Boisberranger</a>.</p></li>
</ul>
</section>
<section id="sklearn-manifold">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.manifold" title="sklearn.manifold"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.manifold</span></code></a><a class="headerlink" href="#sklearn-manifold" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.manifold.TSNE.html#sklearn.manifold.TSNE" title="sklearn.manifold.TSNE"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.TSNE</span></code></a> now works correctly when output type is
set to pandas <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25370">#25370</a> by <a class="reference external" href="https://github.com/betatim">Tim Head</a>.</p></li>
</ul>
</section>
<section id="sklearn-model-selection">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.model_selection" title="sklearn.model_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a><a class="headerlink" href="#sklearn-model-selection" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.model_selection.cross_validate.html#sklearn.model_selection.cross_validate" title="sklearn.model_selection.cross_validate"><code class="xref py py-func docutils literal notranslate"><span class="pre">model_selection.cross_validate</span></code></a> with multimetric scoring in
case of some failing scorers the non-failing scorers now returns proper
scores instead of <code class="docutils literal notranslate"><span class="pre">error_score</span></code> values.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23101">#23101</a> by <a class="reference external" href="https://github.com/simonandras">András Simon</a> and <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</section>
<section id="sklearn-neural-network">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.neural_network" title="sklearn.neural_network"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neural_network</span></code></a><a class="headerlink" href="#sklearn-neural-network" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPClassifier.html#sklearn.neural_network.MLPClassifier" title="sklearn.neural_network.MLPClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPClassifier</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPRegressor.html#sklearn.neural_network.MLPRegressor" title="sklearn.neural_network.MLPRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPRegressor</span></code></a>
no longer raise warnings when fitting data with feature names.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24873">#24873</a> by <a class="reference external" href="https://github.com/betatim">Tim Head</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Improves error message in <a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPClassifier.html#sklearn.neural_network.MLPClassifier" title="sklearn.neural_network.MLPClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.neural_network.MLPRegressor.html#sklearn.neural_network.MLPRegressor" title="sklearn.neural_network.MLPRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">neural_network.MLPRegressor</span></code></a>, when <code class="docutils literal notranslate"><span class="pre">early_stopping=True</span></code> and
<code class="xref py py-meth docutils literal notranslate"><span class="pre">partial_fit</span></code> is called. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25694">#25694</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</section>
<section id="id4">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.preprocessing" title="sklearn.preprocessing"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a><a class="headerlink" href="#id4" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.preprocessing.FunctionTransformer.html#sklearn.preprocessing.FunctionTransformer.inverse_transform" title="sklearn.preprocessing.FunctionTransformer.inverse_transform"><code class="xref py py-meth docutils literal notranslate"><span class="pre">preprocessing.FunctionTransformer.inverse_transform</span></code></a> correctly
supports DataFrames that are all numerical when <code class="docutils literal notranslate"><span class="pre">check_inverse=True</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25274">#25274</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.preprocessing.SplineTransformer.html#sklearn.preprocessing.SplineTransformer.get_feature_names_out" title="sklearn.preprocessing.SplineTransformer.get_feature_names_out"><code class="xref py py-meth docutils literal notranslate"><span class="pre">preprocessing.SplineTransformer.get_feature_names_out</span></code></a> correctly
returns feature names when <code class="docutils literal notranslate"><span class="pre">extrapolations="periodic"</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25296">#25296</a> by
<a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</section>
<section id="id5">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.tree" title="sklearn.tree"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.tree</span></code></a><a class="headerlink" href="#id5" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.tree.DecisionTreeClassifier.html#sklearn.tree.DecisionTreeClassifier" title="sklearn.tree.DecisionTreeClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.DecisionTreeClassifier</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.tree.DecisionTreeRegressor.html#sklearn.tree.DecisionTreeRegressor" title="sklearn.tree.DecisionTreeRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.DecisionTreeRegressor</span></code></a>
<a class="reference internal" href="../modules/generated/sklearn.tree.ExtraTreeClassifier.html#sklearn.tree.ExtraTreeClassifier" title="sklearn.tree.ExtraTreeClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.ExtraTreeClassifier</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.tree.ExtraTreeRegressor.html#sklearn.tree.ExtraTreeRegressor" title="sklearn.tree.ExtraTreeRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">tree.ExtraTreeRegressor</span></code></a>
now support sparse readonly datasets.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25341">#25341</a> by <a class="reference external" href="https://github.com/jjerphan">Julien Jerphanion</a></p></li>
</ul>
</section>
<section id="id6">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.utils" title="sklearn.utils"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.utils</span></code></a><a class="headerlink" href="#id6" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Restore <a class="reference internal" href="../modules/generated/sklearn.utils.check_array.html#sklearn.utils.check_array" title="sklearn.utils.check_array"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.check_array</span></code></a>’s behaviour for pandas Series of type
boolean. The type is maintained, instead of converting to <code class="docutils literal notranslate"><span class="pre">float64.</span></code>
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25147">#25147</a> by <a class="reference external" href="https://github.com/betatim">Tim Head</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> <code class="xref py py-func docutils literal notranslate"><span class="pre">utils.fixes.delayed</span></code> is deprecated in 1.2.1 and will be removed
in 1.5. Instead, import <a class="reference internal" href="../modules/generated/sklearn.utils.parallel.delayed.html#sklearn.utils.parallel.delayed" title="sklearn.utils.parallel.delayed"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.parallel.delayed</span></code></a> and use it in
conjunction with the newly introduced <a class="reference internal" href="../modules/generated/sklearn.utils.parallel.Parallel.html#sklearn.utils.parallel.Parallel" title="sklearn.utils.parallel.Parallel"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.parallel.Parallel</span></code></a>
to ensure proper propagation of the scikit-learn configuration to
the workers.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25363">#25363</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</section>
</section>
</section>
<section id="version-1-2-0">
<span id="changes-1-2"></span><h1>Version 1.2.0<a class="headerlink" href="#version-1-2-0" title="Permalink to this heading">¶</a></h1>
<p><strong>December 2022</strong></p>
<p>For a short description of the main highlights of the release, please refer to
<a class="reference internal" href="../auto_examples/release_highlights/plot_release_highlights_1_2_0.html#sphx-glr-auto-examples-release-highlights-plot-release-highlights-1-2-0-py"><span class="std std-ref">Release Highlights for scikit-learn 1.2</span></a>.</p>
<section id="legend-for-changelogs">
<h2>Legend for changelogs<a class="headerlink" href="#legend-for-changelogs" title="Permalink to this heading">¶</a></h2>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span> : something big that you couldn’t do before.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span> : something that you couldn’t do before.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span> : an existing feature now may not require as much computation or
memory.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> : a miscellaneous minor improvement.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> : something that previously didn’t work as documentated – or according
to reasonable expectations – should now work.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> : you will need to change your code to have the same effect in the
future; or a feature will be removed in the future.</p></li>
</ul>
</section>
<section id="id7">
<h2>Changed models<a class="headerlink" href="#id7" title="Permalink to this heading">¶</a></h2>
<p>The following estimators and functions, when fit with the same data and
parameters, may produce different models from the previous version. This often
occurs due to changes in the modelling logic (bug fixes or enhancements), or in
random sampling procedures.</p>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> The default <code class="docutils literal notranslate"><span class="pre">eigen_tol</span></code> for <a class="reference internal" href="../modules/generated/sklearn.cluster.SpectralClustering.html#sklearn.cluster.SpectralClustering" title="sklearn.cluster.SpectralClustering"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.SpectralClustering</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.manifold.SpectralEmbedding.html#sklearn.manifold.SpectralEmbedding" title="sklearn.manifold.SpectralEmbedding"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.SpectralEmbedding</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.cluster.spectral_clustering.html#sklearn.cluster.spectral_clustering" title="sklearn.cluster.spectral_clustering"><code class="xref py py-func docutils literal notranslate"><span class="pre">cluster.spectral_clustering</span></code></a>,
and <a class="reference internal" href="../modules/generated/sklearn.manifold.spectral_embedding.html#sklearn.manifold.spectral_embedding" title="sklearn.manifold.spectral_embedding"><code class="xref py py-func docutils literal notranslate"><span class="pre">manifold.spectral_embedding</span></code></a> is now <code class="docutils literal notranslate"><span class="pre">None</span></code> when using the <code class="docutils literal notranslate"><span class="pre">'amg'</span></code>
or <code class="docutils literal notranslate"><span class="pre">'lobpcg'</span></code> solvers. This change improves numerical stability of the
solver, but may result in a different model.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.linear_model.GammaRegressor.html#sklearn.linear_model.GammaRegressor" title="sklearn.linear_model.GammaRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.GammaRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.PoissonRegressor.html#sklearn.linear_model.PoissonRegressor" title="sklearn.linear_model.PoissonRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.PoissonRegressor</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.linear_model.TweedieRegressor.html#sklearn.linear_model.TweedieRegressor" title="sklearn.linear_model.TweedieRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.TweedieRegressor</span></code></a>
can reach higher precision with the lbfgs solver, in particular when <code class="docutils literal notranslate"><span class="pre">tol</span></code> is set
to a tiny value. Moreover, <code class="docutils literal notranslate"><span class="pre">verbose</span></code> is now properly propagated to L-BFGS-B.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23619">#23619</a> by <a class="reference external" href="https://github.com/lorentzenchr">Christian Lorentzen</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> The default value for <code class="docutils literal notranslate"><span class="pre">eps</span></code> <code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.logloss</span></code> has changed
from <code class="docutils literal notranslate"><span class="pre">1e-15</span></code> to <code class="docutils literal notranslate"><span class="pre">"auto"</span></code>. <code class="docutils literal notranslate"><span class="pre">"auto"</span></code> sets <code class="docutils literal notranslate"><span class="pre">eps</span></code> to <code class="docutils literal notranslate"><span class="pre">np.finfo(y_pred.dtype).eps</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24354">#24354</a> by <a class="reference external" href="https://github.com/Safikh">Safiuddin Khaja</a> and <a class="reference external" href="https://github.com/gsiisg">gsiisg</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Make sign of <code class="docutils literal notranslate"><span class="pre">components_</span></code> deterministic in <a class="reference internal" href="../modules/generated/sklearn.decomposition.SparsePCA.html#sklearn.decomposition.SparsePCA" title="sklearn.decomposition.SparsePCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.SparsePCA</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23935">#23935</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> The <code class="docutils literal notranslate"><span class="pre">components_</span></code> signs in <a class="reference internal" href="../modules/generated/sklearn.decomposition.FastICA.html#sklearn.decomposition.FastICA" title="sklearn.decomposition.FastICA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.FastICA</span></code></a> might differ.
It is now consistent and deterministic with all SVD solvers.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/22527">#22527</a> by <a class="reference external" href="https://github.com/micky774">Meekail Zain</a> and <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> The condition for early stopping has now been changed in
<code class="xref py py-func docutils literal notranslate"><span class="pre">linear_model._sgd_fast._plain_sgd</span></code> which is used by
<a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor" title="sklearn.linear_model.SGDRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDRegressor</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier" title="sklearn.linear_model.SGDClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDClassifier</span></code></a>. The old
condition did not disambiguate between
training and validation set and had an effect of overscaling the error tolerance.
This has been fixed in <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23798">#23798</a> by <a class="reference external" href="https://github.com/Harsh14901">Harsh Agrawal</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> For <a class="reference internal" href="../modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" title="sklearn.model_selection.GridSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.GridSearchCV</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.model_selection.RandomizedSearchCV.html#sklearn.model_selection.RandomizedSearchCV" title="sklearn.model_selection.RandomizedSearchCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.RandomizedSearchCV</span></code></a> ranks corresponding to nan
scores will all be set to the maximum possible rank.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24543">#24543</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> The default value of <code class="docutils literal notranslate"><span class="pre">tol</span></code> was changed from <code class="docutils literal notranslate"><span class="pre">1e-3</span></code> to <code class="docutils literal notranslate"><span class="pre">1e-4</span></code> for
<a class="reference internal" href="../modules/generated/sklearn.linear_model.ridge_regression.html#sklearn.linear_model.ridge_regression" title="sklearn.linear_model.ridge_regression"><code class="xref py py-func docutils literal notranslate"><span class="pre">linear_model.ridge_regression</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.linear_model.Ridge.html#sklearn.linear_model.Ridge" title="sklearn.linear_model.Ridge"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Ridge</span></code></a> and
<code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.`RidgeClassifier</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24465">#24465</a> by <a class="reference external" href="https://github.com/lorentzenchr">Christian Lorentzen</a>.</p></li>
</ul>
</section>
<section id="id8">
<h2>Changes impacting all modules<a class="headerlink" href="#id8" title="Permalink to this heading">¶</a></h2>
<ul>
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span> The <code class="docutils literal notranslate"><span class="pre">set_output</span></code> API has been adopted by all transformers.
Meta-estimators that contain transformers such as <a class="reference internal" href="../modules/generated/sklearn.pipeline.Pipeline.html#sklearn.pipeline.Pipeline" title="sklearn.pipeline.Pipeline"><code class="xref py py-class docutils literal notranslate"><span class="pre">pipeline.Pipeline</span></code></a>
or <a class="reference internal" href="../modules/generated/sklearn.compose.ColumnTransformer.html#sklearn.compose.ColumnTransformer" title="sklearn.compose.ColumnTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.ColumnTransformer</span></code></a> also define a <code class="docutils literal notranslate"><span class="pre">set_output</span></code>.
For details, see
<a class="reference external" href="https://scikit-learn-enhancement-proposals.readthedocs.io/en/latest/slep018/proposal.html">SLEP018</a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23734">#23734</a> and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24699">#24699</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span> Low-level routines for reductions on pairwise distances
for dense float32 datasets have been refactored. The following functions
and estimators now benefit from improved performances in terms of hardware
scalability and speed-ups:</p>
<ul class="simple">
<li><p><a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise_distances_argmin.html#sklearn.metrics.pairwise_distances_argmin" title="sklearn.metrics.pairwise_distances_argmin"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.metrics.pairwise_distances_argmin</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise_distances_argmin_min.html#sklearn.metrics.pairwise_distances_argmin_min" title="sklearn.metrics.pairwise_distances_argmin_min"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.metrics.pairwise_distances_argmin_min</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.cluster.AffinityPropagation.html#sklearn.cluster.AffinityPropagation" title="sklearn.cluster.AffinityPropagation"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.cluster.AffinityPropagation</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.cluster.Birch.html#sklearn.cluster.Birch" title="sklearn.cluster.Birch"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.cluster.Birch</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.cluster.MeanShift.html#sklearn.cluster.MeanShift" title="sklearn.cluster.MeanShift"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.cluster.MeanShift</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.cluster.OPTICS.html#sklearn.cluster.OPTICS" title="sklearn.cluster.OPTICS"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.cluster.OPTICS</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.cluster.SpectralClustering.html#sklearn.cluster.SpectralClustering" title="sklearn.cluster.SpectralClustering"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.cluster.SpectralClustering</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.feature_selection.mutual_info_regression.html#sklearn.feature_selection.mutual_info_regression" title="sklearn.feature_selection.mutual_info_regression"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.feature_selection.mutual_info_regression</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neighbors.KNeighborsClassifier.html#sklearn.neighbors.KNeighborsClassifier" title="sklearn.neighbors.KNeighborsClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.KNeighborsClassifier</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neighbors.KNeighborsRegressor.html#sklearn.neighbors.KNeighborsRegressor" title="sklearn.neighbors.KNeighborsRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.KNeighborsRegressor</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neighbors.RadiusNeighborsClassifier.html#sklearn.neighbors.RadiusNeighborsClassifier" title="sklearn.neighbors.RadiusNeighborsClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.RadiusNeighborsClassifier</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neighbors.RadiusNeighborsRegressor.html#sklearn.neighbors.RadiusNeighborsRegressor" title="sklearn.neighbors.RadiusNeighborsRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.RadiusNeighborsRegressor</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neighbors.LocalOutlierFactor.html#sklearn.neighbors.LocalOutlierFactor" title="sklearn.neighbors.LocalOutlierFactor"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.LocalOutlierFactor</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neighbors.NearestNeighbors.html#sklearn.neighbors.NearestNeighbors" title="sklearn.neighbors.NearestNeighbors"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.NearestNeighbors</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.manifold.Isomap.html#sklearn.manifold.Isomap" title="sklearn.manifold.Isomap"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.manifold.Isomap</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.manifold.LocallyLinearEmbedding.html#sklearn.manifold.LocallyLinearEmbedding" title="sklearn.manifold.LocallyLinearEmbedding"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.manifold.LocallyLinearEmbedding</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.manifold.TSNE.html#sklearn.manifold.TSNE" title="sklearn.manifold.TSNE"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.manifold.TSNE</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.manifold.trustworthiness.html#sklearn.manifold.trustworthiness" title="sklearn.manifold.trustworthiness"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.manifold.trustworthiness</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.semi_supervised.LabelPropagation.html#sklearn.semi_supervised.LabelPropagation" title="sklearn.semi_supervised.LabelPropagation"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.semi_supervised.LabelPropagation</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.semi_supervised.LabelSpreading.html#sklearn.semi_supervised.LabelSpreading" title="sklearn.semi_supervised.LabelSpreading"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.semi_supervised.LabelSpreading</span></code></a></p></li>
</ul>
<p>For instance <a class="reference internal" href="../modules/generated/sklearn.neighbors.NearestNeighbors.html#sklearn.neighbors.NearestNeighbors.kneighbors" title="sklearn.neighbors.NearestNeighbors.kneighbors"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.NearestNeighbors.kneighbors</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.neighbors.NearestNeighbors.html#sklearn.neighbors.NearestNeighbors.radius_neighbors" title="sklearn.neighbors.NearestNeighbors.radius_neighbors"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.NearestNeighbors.radius_neighbors</span></code></a>
can respectively be up to ×20 and ×5 faster than previously on a laptop.</p>
<p>Moreover, implementations of those two algorithms are now suitable
for machine with many cores, making them usable for datasets consisting
of millions of samples.</p>
<p><a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23865">#23865</a> by <a class="reference external" href="https://github.com/jjerphan">Julien Jerphanion</a>.</p>
</li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> Finiteness checks (detection of NaN and infinite values) in all
estimators are now significantly more efficient for float32 data by leveraging
NumPy’s SIMD optimized primitives.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23446">#23446</a> by <a class="reference external" href="https://github.com/micky774">Meekail Zain</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> Finiteness checks (detection of NaN and infinite values) in all
estimators are now faster by utilizing a more efficient stop-on-first
second-pass algorithm.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23197">#23197</a> by <a class="reference external" href="https://github.com/micky774">Meekail Zain</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> Support for combinations of dense and sparse datasets pairs
for all distance metrics and for float32 and float64 datasets has been added
or has seen its performance improved for the following estimators:</p>
<ul class="simple">
<li><p><a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise_distances_argmin.html#sklearn.metrics.pairwise_distances_argmin" title="sklearn.metrics.pairwise_distances_argmin"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.metrics.pairwise_distances_argmin</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.metrics.pairwise_distances_argmin_min.html#sklearn.metrics.pairwise_distances_argmin_min" title="sklearn.metrics.pairwise_distances_argmin_min"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.metrics.pairwise_distances_argmin_min</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.cluster.AffinityPropagation.html#sklearn.cluster.AffinityPropagation" title="sklearn.cluster.AffinityPropagation"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.cluster.AffinityPropagation</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.cluster.Birch.html#sklearn.cluster.Birch" title="sklearn.cluster.Birch"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.cluster.Birch</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.cluster.SpectralClustering.html#sklearn.cluster.SpectralClustering" title="sklearn.cluster.SpectralClustering"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.cluster.SpectralClustering</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neighbors.KNeighborsClassifier.html#sklearn.neighbors.KNeighborsClassifier" title="sklearn.neighbors.KNeighborsClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.KNeighborsClassifier</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neighbors.KNeighborsRegressor.html#sklearn.neighbors.KNeighborsRegressor" title="sklearn.neighbors.KNeighborsRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.KNeighborsRegressor</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neighbors.RadiusNeighborsClassifier.html#sklearn.neighbors.RadiusNeighborsClassifier" title="sklearn.neighbors.RadiusNeighborsClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.RadiusNeighborsClassifier</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neighbors.RadiusNeighborsRegressor.html#sklearn.neighbors.RadiusNeighborsRegressor" title="sklearn.neighbors.RadiusNeighborsRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.RadiusNeighborsRegressor</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neighbors.LocalOutlierFactor.html#sklearn.neighbors.LocalOutlierFactor" title="sklearn.neighbors.LocalOutlierFactor"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.LocalOutlierFactor</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.neighbors.NearestNeighbors.html#sklearn.neighbors.NearestNeighbors" title="sklearn.neighbors.NearestNeighbors"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.neighbors.NearestNeighbors</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.manifold.Isomap.html#sklearn.manifold.Isomap" title="sklearn.manifold.Isomap"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.manifold.Isomap</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.manifold.TSNE.html#sklearn.manifold.TSNE" title="sklearn.manifold.TSNE"><code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.manifold.TSNE</span></code></a></p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.manifold.trustworthiness.html#sklearn.manifold.trustworthiness" title="sklearn.manifold.trustworthiness"><code class="xref py py-func docutils literal notranslate"><span class="pre">sklearn.manifold.trustworthiness</span></code></a></p></li>
</ul>
<p><a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23604">#23604</a> and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23585">#23585</a> by <a class="reference external" href="https://github.com/jjerphan">Julien Jerphanion</a>,
<a class="reference external" href="https://github.com/ogrisel">Olivier Grisel</a>, and <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>,
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24556">#24556</a> by <a class="reference external" href="https://github.com/Vincent-Maladiere">Vincent Maladière</a>.</p>
</li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Systematically check the sha256 digest of dataset tarballs used in code
examples in the documentation.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24617">#24617</a> by <a class="reference external" href="https://github.com/ogrisel">Olivier Grisel</a> and <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>. Thanks to
<a class="reference external" href="https://huntr.dev/users/sim4n6">Sim4n6</a> for the report.</p></li>
</ul>
</section>
<section id="id9">
<h2>Changelog<a class="headerlink" href="#id9" title="Permalink to this heading">¶</a></h2>
<section id="id10">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.base" title="sklearn.base"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.base</span></code></a><a class="headerlink" href="#id10" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> Introduces <a class="reference internal" href="../modules/generated/sklearn.base.ClassNamePrefixFeaturesOutMixin.html#sklearn.base.ClassNamePrefixFeaturesOutMixin" title="sklearn.base.ClassNamePrefixFeaturesOutMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">base.ClassNamePrefixFeaturesOutMixin</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.base.ClassNamePrefixFeaturesOutMixin.html#sklearn.base.ClassNamePrefixFeaturesOutMixin" title="sklearn.base.ClassNamePrefixFeaturesOutMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">base.ClassNamePrefixFeaturesOutMixin</span></code></a> mixins that defines
<a class="reference internal" href="../glossary.html#term-get_feature_names_out"><span class="xref std std-term">get_feature_names_out</span></a> for common transformer uses cases.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24688">#24688</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</section>
<section id="id11">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.calibration" title="sklearn.calibration"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.calibration</span></code></a><a class="headerlink" href="#id11" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> Rename <code class="docutils literal notranslate"><span class="pre">base_estimator</span></code> to <code class="docutils literal notranslate"><span class="pre">estimator</span></code> in
<a class="reference internal" href="../modules/generated/sklearn.calibration.CalibratedClassifierCV.html#sklearn.calibration.CalibratedClassifierCV" title="sklearn.calibration.CalibratedClassifierCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">calibration.CalibratedClassifierCV</span></code></a> to improve readability and consistency.
The parameter <code class="docutils literal notranslate"><span class="pre">base_estimator</span></code> is deprecated and will be removed in 1.4.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/22054">#22054</a> by <a class="reference external" href="https://github.com/kevroi">Kevin Roice</a>.</p></li>
</ul>
</section>
<section id="id12">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.cluster" title="sklearn.cluster"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a><a class="headerlink" href="#id12" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span> <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> with <code class="docutils literal notranslate"><span class="pre">algorithm="lloyd"</span></code> is now faster
and uses less memory. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24264">#24264</a> by
<a class="reference external" href="https://github.com/Vincent-Maladiere">Vincent Maladiere</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> The <code class="docutils literal notranslate"><span class="pre">predict</span></code> and <code class="docutils literal notranslate"><span class="pre">fit_predict</span></code> methods of <a class="reference internal" href="../modules/generated/sklearn.cluster.OPTICS.html#sklearn.cluster.OPTICS" title="sklearn.cluster.OPTICS"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.OPTICS</span></code></a> now
accept sparse data type for input data. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14736">#14736</a> by <a class="reference external" href="https://github.com/huntzhan">Hunt Zhan</a>,
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/20802">#20802</a> by <a class="reference external" href="https://github.com/Clickedbigfoot">Brandon Pokorny</a>,
and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/22965">#22965</a> by <a class="reference external" href="https://github.com/micky774">Meekail Zain</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.cluster.Birch.html#sklearn.cluster.Birch" title="sklearn.cluster.Birch"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.Birch</span></code></a> now preserves dtype for <code class="docutils literal notranslate"><span class="pre">numpy.float32</span></code>
inputs. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/22968">#22968</a> by <code class="docutils literal notranslate"><span class="pre">Meekail</span> <span class="pre">Zain</span> <span class="pre"><micky774></span></code>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.cluster.MiniBatchKMeans.html#sklearn.cluster.MiniBatchKMeans" title="sklearn.cluster.MiniBatchKMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.MiniBatchKMeans</span></code></a>
now accept a new <code class="docutils literal notranslate"><span class="pre">'auto'</span></code> option for <code class="docutils literal notranslate"><span class="pre">n_init</span></code> which changes the number of
random initializations to one when using <code class="docutils literal notranslate"><span class="pre">init='k-means++'</span></code> for efficiency.
This begins deprecation for the default values of <code class="docutils literal notranslate"><span class="pre">n_init</span></code> in the two classes
and both will have their defaults changed to <code class="docutils literal notranslate"><span class="pre">n_init='auto'</span></code> in 1.4.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23038">#23038</a> by <a class="reference external" href="https://github.com/micky774">Meekail Zain</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.cluster.SpectralClustering.html#sklearn.cluster.SpectralClustering" title="sklearn.cluster.SpectralClustering"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.SpectralClustering</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.cluster.spectral_clustering.html#sklearn.cluster.spectral_clustering" title="sklearn.cluster.spectral_clustering"><code class="xref py py-func docutils literal notranslate"><span class="pre">cluster.spectral_clustering</span></code></a> now propogates the <code class="docutils literal notranslate"><span class="pre">eigen_tol</span></code> parameter
to all choices of <code class="docutils literal notranslate"><span class="pre">eigen_solver</span></code>. Includes a new option <code class="docutils literal notranslate"><span class="pre">eigen_tol="auto"</span></code>
and begins deprecation to change the default from <code class="docutils literal notranslate"><span class="pre">eigen_tol=0</span></code> to
<code class="docutils literal notranslate"><span class="pre">eigen_tol="auto"</span></code> in version 1.3.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23210">#23210</a> by <a class="reference external" href="https://github.com/micky774">Meekail Zain</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.cluster.KMeans.html#sklearn.cluster.KMeans" title="sklearn.cluster.KMeans"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.KMeans</span></code></a> now supports readonly attributes when predicting.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24258">#24258</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> The <code class="docutils literal notranslate"><span class="pre">affinity</span></code> attribute is now deprecated for
<a class="reference internal" href="../modules/generated/sklearn.cluster.AgglomerativeClustering.html#sklearn.cluster.AgglomerativeClustering" title="sklearn.cluster.AgglomerativeClustering"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.AgglomerativeClustering</span></code></a> and will be renamed to <code class="docutils literal notranslate"><span class="pre">metric</span></code> in v1.4.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23470">#23470</a> by <a class="reference external" href="https://github.com/micky774">Meekail Zain</a>.</p></li>
</ul>
</section>
<section id="id13">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.datasets" title="sklearn.datasets"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a><a class="headerlink" href="#id13" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> Introduce the new parameter <code class="docutils literal notranslate"><span class="pre">parser</span></code> in
<a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_openml.html#sklearn.datasets.fetch_openml" title="sklearn.datasets.fetch_openml"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_openml</span></code></a>. <code class="docutils literal notranslate"><span class="pre">parser="pandas"</span></code> allows to use the very CPU
and memory efficient <code class="docutils literal notranslate"><span class="pre">pandas.read_csv</span></code> parser to load dense ARFF
formatted dataset files. It is possible to pass <code class="docutils literal notranslate"><span class="pre">parser="liac-arff"</span></code>
to use the old LIAC parser.
When <code class="docutils literal notranslate"><span class="pre">parser="auto"</span></code>, dense datasets are loaded with “pandas” and sparse
datasets are loaded with “liac-arff”.
Currently, <code class="docutils literal notranslate"><span class="pre">parser="liac-arff"</span></code> by default and will change to <code class="docutils literal notranslate"><span class="pre">parser="auto"</span></code>
in version 1.4
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/21938">#21938</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.datasets.dump_svmlight_file.html#sklearn.datasets.dump_svmlight_file" title="sklearn.datasets.dump_svmlight_file"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.dump_svmlight_file</span></code></a> is now accelerated with a
Cython implementation, providing 2-4x speedups.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23127">#23127</a> by <a class="reference external" href="https://github.com/micky774">Meekail Zain</a></p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> Path-like objects, such as those created with pathlib are now
allowed as paths in <a class="reference internal" href="../modules/generated/sklearn.datasets.load_svmlight_file.html#sklearn.datasets.load_svmlight_file" title="sklearn.datasets.load_svmlight_file"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.load_svmlight_file</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.datasets.load_svmlight_files.html#sklearn.datasets.load_svmlight_files" title="sklearn.datasets.load_svmlight_files"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.load_svmlight_files</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/19075">#19075</a> by <a class="reference external" href="https://github.com/vnmabus">Carlos Ramos Carreño</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Make sure that <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_lfw_people.html#sklearn.datasets.fetch_lfw_people" title="sklearn.datasets.fetch_lfw_people"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_lfw_people</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_lfw_pairs.html#sklearn.datasets.fetch_lfw_pairs" title="sklearn.datasets.fetch_lfw_pairs"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_lfw_pairs</span></code></a> internally crops images based on the
<code class="docutils literal notranslate"><span class="pre">slice_</span></code> parameter.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24951">#24951</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</section>
<section id="id14">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.decomposition" title="sklearn.decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a><a class="headerlink" href="#id14" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span> <a class="reference internal" href="../modules/generated/sklearn.decomposition.FastICA.html#sklearn.decomposition.FastICA.fit" title="sklearn.decomposition.FastICA.fit"><code class="xref py py-func docutils literal notranslate"><span class="pre">decomposition.FastICA.fit</span></code></a> has been optimised w.r.t
its memory footprint and runtime.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/22268">#22268</a> by <a class="reference external" href="https://github.com/Bsh">MohamedBsh</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.decomposition.SparsePCA.html#sklearn.decomposition.SparsePCA" title="sklearn.decomposition.SparsePCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.SparsePCA</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.decomposition.MiniBatchSparsePCA.html#sklearn.decomposition.MiniBatchSparsePCA" title="sklearn.decomposition.MiniBatchSparsePCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.MiniBatchSparsePCA</span></code></a> now implements an <code class="docutils literal notranslate"><span class="pre">inverse_transform</span></code>
function.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23905">#23905</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.decomposition.FastICA.html#sklearn.decomposition.FastICA" title="sklearn.decomposition.FastICA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.FastICA</span></code></a> now allows the user to select
how whitening is performed through the new <code class="docutils literal notranslate"><span class="pre">whiten_solver</span></code> parameter, which
supports <code class="docutils literal notranslate"><span class="pre">svd</span></code> and <code class="docutils literal notranslate"><span class="pre">eigh</span></code>. <code class="docutils literal notranslate"><span class="pre">whiten_solver</span></code> defaults to <code class="docutils literal notranslate"><span class="pre">svd</span></code> although <code class="docutils literal notranslate"><span class="pre">eigh</span></code>
may be faster and more memory efficient in cases where
<code class="docutils literal notranslate"><span class="pre">num_features</span> <span class="pre">></span> <span class="pre">num_samples</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/11860">#11860</a> by <a class="reference external" href="https://github.com/pierreablin">Pierre Ablin</a>,
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/22527">#22527</a> by <a class="reference external" href="https://github.com/micky774">Meekail Zain</a> and <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.decomposition.LatentDirichletAllocation.html#sklearn.decomposition.LatentDirichletAllocation" title="sklearn.decomposition.LatentDirichletAllocation"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.LatentDirichletAllocation</span></code></a> now preserves dtype
for <code class="docutils literal notranslate"><span class="pre">numpy.float32</span></code> input. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24528">#24528</a> by <a class="reference external" href="https://github.com/takoika">Takeshi Oura</a> and
<a class="reference external" href="https://github.com/jeremiedbb">Jérémie du Boisberranger</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Make sign of <code class="docutils literal notranslate"><span class="pre">components_</span></code> deterministic in <a class="reference internal" href="../modules/generated/sklearn.decomposition.SparsePCA.html#sklearn.decomposition.SparsePCA" title="sklearn.decomposition.SparsePCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.SparsePCA</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23935">#23935</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> The <code class="docutils literal notranslate"><span class="pre">n_iter</span></code> parameter of <a class="reference internal" href="../modules/generated/sklearn.decomposition.MiniBatchSparsePCA.html#sklearn.decomposition.MiniBatchSparsePCA" title="sklearn.decomposition.MiniBatchSparsePCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.MiniBatchSparsePCA</span></code></a> is
deprecated and replaced by the parameters <code class="docutils literal notranslate"><span class="pre">max_iter</span></code>, <code class="docutils literal notranslate"><span class="pre">tol</span></code>, and
<code class="docutils literal notranslate"><span class="pre">max_no_improvement</span></code> to be consistent with
<a class="reference internal" href="../modules/generated/sklearn.decomposition.MiniBatchDictionaryLearning.html#sklearn.decomposition.MiniBatchDictionaryLearning" title="sklearn.decomposition.MiniBatchDictionaryLearning"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.MiniBatchDictionaryLearning</span></code></a>. <code class="docutils literal notranslate"><span class="pre">n_iter</span></code> will be removed
in version 1.3. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23726">#23726</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> The <code class="docutils literal notranslate"><span class="pre">n_features_</span></code> attribute of
<a class="reference internal" href="../modules/generated/sklearn.decomposition.PCA.html#sklearn.decomposition.PCA" title="sklearn.decomposition.PCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.PCA</span></code></a> is deprecated in favor of
<code class="docutils literal notranslate"><span class="pre">n_features_in_</span></code> and will be removed in 1.4. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24421">#24421</a> by
<a class="reference external" href="https://github.com/Kshitij68">Kshitij Mathur</a>.</p></li>
</ul>
</section>
<section id="sklearn-discriminant-analysis">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.discriminant_analysis" title="sklearn.discriminant_analysis"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.discriminant_analysis</span></code></a><a class="headerlink" href="#sklearn-discriminant-analysis" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span> <a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.LinearDiscriminantAnalysis.html#sklearn.discriminant_analysis.LinearDiscriminantAnalysis" title="sklearn.discriminant_analysis.LinearDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.LinearDiscriminantAnalysis</span></code></a> now
supports the <a class="reference external" href="https://data-apis.org/array-api/latest/">Array API</a> for
<code class="docutils literal notranslate"><span class="pre">solver="svd"</span></code>. Array API support is considered experimental and might evolve
without being subjected to our usual rolling deprecation cycle policy. See
<a class="reference internal" href="../modules/array_api.html#array-api"><span class="std std-ref">Array API support (experimental)</span></a> for more details. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/22554">#22554</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Validate parameters only in <code class="docutils literal notranslate"><span class="pre">fit</span></code> and not in <code class="docutils literal notranslate"><span class="pre">__init__</span></code>
for <a class="reference internal" href="../modules/generated/sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis.html#sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis" title="sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis"><code class="xref py py-class docutils literal notranslate"><span class="pre">discriminant_analysis.QuadraticDiscriminantAnalysis</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24218">#24218</a> by <a class="reference external" href="https://github.com/stefmolin">Stefanie Molin</a>.</p></li>
</ul>
</section>
<section id="id15">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.ensemble" title="sklearn.ensemble"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a><a class="headerlink" href="#id15" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span> <a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingClassifier.html#sklearn.ensemble.HistGradientBoostingClassifier" title="sklearn.ensemble.HistGradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingRegressor.html#sklearn.ensemble.HistGradientBoostingRegressor" title="sklearn.ensemble.HistGradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingRegressor</span></code></a> now support
interaction constraints via the argument <code class="docutils literal notranslate"><span class="pre">interaction_cst</span></code> of their
constructors.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/21020">#21020</a> by <a class="reference external" href="https://github.com/lorentzenchr">Christian Lorentzen</a>.
Using interaction constraints also makes fitting faster.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24856">#24856</a> by <a class="reference external" href="https://github.com/lorentzenchr">Christian Lorentzen</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span> Adds <code class="docutils literal notranslate"><span class="pre">class_weight</span></code> to <a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingClassifier.html#sklearn.ensemble.HistGradientBoostingClassifier" title="sklearn.ensemble.HistGradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingClassifier</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/22014">#22014</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Efficiency</span></span> Improve runtime performance of <a class="reference internal" href="../modules/generated/sklearn.ensemble.IsolationForest.html#sklearn.ensemble.IsolationForest" title="sklearn.ensemble.IsolationForest"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.IsolationForest</span></code></a>
by avoiding data copies. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23252">#23252</a> by <a class="reference external" href="https://github.com/MaxwellLZH">Zhehao Liu</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.ensemble.StackingClassifier.html#sklearn.ensemble.StackingClassifier" title="sklearn.ensemble.StackingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.StackingClassifier</span></code></a> now accepts any kind of
base estimator.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24538">#24538</a> by <a class="reference external" href="https://github.com/GuillemGSubies">Guillem G Subies</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> Make it possible to pass the <code class="docutils literal notranslate"><span class="pre">categorical_features</span></code> parameter
of <a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingClassifier.html#sklearn.ensemble.HistGradientBoostingClassifier" title="sklearn.ensemble.HistGradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingRegressor.html#sklearn.ensemble.HistGradientBoostingRegressor" title="sklearn.ensemble.HistGradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingRegressor</span></code></a> as feature names.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24889">#24889</a> by <a class="reference external" href="https://github.com/ogrisel">Olivier Grisel</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.ensemble.StackingClassifier.html#sklearn.ensemble.StackingClassifier" title="sklearn.ensemble.StackingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.StackingClassifier</span></code></a> now supports
multilabel-indicator target
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24146">#24146</a> by <a class="reference external" href="https://github.com/nicoperetti">Nicolas Peretti</a>,
<a class="reference external" href="https://github.com/nestornav">Nestor Navarro</a>, <a class="reference external" href="https://github.com/natitomattis">Nati Tomattis</a>,
and <a class="reference external" href="https://github.com/Vincent-Maladiere">Vincent Maladiere</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingClassifier.html#sklearn.ensemble.HistGradientBoostingClassifier" title="sklearn.ensemble.HistGradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingClassifier.html#sklearn.ensemble.HistGradientBoostingClassifier" title="sklearn.ensemble.HistGradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingClassifier</span></code></a> now accept their
<code class="docutils literal notranslate"><span class="pre">monotonic_cst</span></code> parameter to be passed as a dictionary in addition
to the previously supported array-like format.
Such dictionary have feature names as keys and one of <code class="docutils literal notranslate"><span class="pre">-1</span></code>, <code class="docutils literal notranslate"><span class="pre">0</span></code>, <code class="docutils literal notranslate"><span class="pre">1</span></code>
as value to specify monotonicity constraints for each feature.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24855">#24855</a> by <a class="reference external" href="https://github.com/ogrisel">Olivier Grisel</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> Interaction constraints for
<a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingClassifier.html#sklearn.ensemble.HistGradientBoostingClassifier" title="sklearn.ensemble.HistGradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingClassifier</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingRegressor.html#sklearn.ensemble.HistGradientBoostingRegressor" title="sklearn.ensemble.HistGradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingRegressor</span></code></a> can now be specified
as strings for two common cases: “no_interactions” and “pairwise” interactions.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24849">#24849</a> by <a class="reference external" href="https://github.com/betatim">Tim Head</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fixed the issue where <a class="reference internal" href="../modules/generated/sklearn.ensemble.AdaBoostClassifier.html#sklearn.ensemble.AdaBoostClassifier" title="sklearn.ensemble.AdaBoostClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.AdaBoostClassifier</span></code></a> outputs
NaN in feature importance when fitted with very small sample weight.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/20415">#20415</a> by <a class="reference external" href="https://github.com/MaxwellLZH">Zhehao Liu</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingClassifier.html#sklearn.ensemble.HistGradientBoostingClassifier" title="sklearn.ensemble.HistGradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingRegressor.html#sklearn.ensemble.HistGradientBoostingRegressor" title="sklearn.ensemble.HistGradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingRegressor</span></code></a> no longer error when predicting
on categories encoded as negative values and instead consider them a member
of the “missing category”. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24283">#24283</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingClassifier.html#sklearn.ensemble.HistGradientBoostingClassifier" title="sklearn.ensemble.HistGradientBoostingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingClassifier</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.ensemble.HistGradientBoostingRegressor.html#sklearn.ensemble.HistGradientBoostingRegressor" title="sklearn.ensemble.HistGradientBoostingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.HistGradientBoostingRegressor</span></code></a>, with <code class="docutils literal notranslate"><span class="pre">verbose>=1</span></code>, print detailed
timing information on computing histograms and finding best splits. The time spent in
the root node was previously missing and is now included in the printed information.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24894">#24894</a> by <a class="reference external" href="https://github.com/lorentzenchr">Christian Lorentzen</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> Rename the constructor parameter <code class="docutils literal notranslate"><span class="pre">base_estimator</span></code> to <code class="docutils literal notranslate"><span class="pre">estimator</span></code> in
the following classes:
<a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingClassifier.html#sklearn.ensemble.BaggingClassifier" title="sklearn.ensemble.BaggingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingRegressor.html#sklearn.ensemble.BaggingRegressor" title="sklearn.ensemble.BaggingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.AdaBoostClassifier.html#sklearn.ensemble.AdaBoostClassifier" title="sklearn.ensemble.AdaBoostClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.AdaBoostClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.AdaBoostRegressor.html#sklearn.ensemble.AdaBoostRegressor" title="sklearn.ensemble.AdaBoostRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.AdaBoostRegressor</span></code></a>.
<code class="docutils literal notranslate"><span class="pre">base_estimator</span></code> is deprecated in 1.2 and will be removed in 1.4.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23819">#23819</a> by <a class="reference external" href="https://github.com/trujillo9616">Adrian Trujillo</a> and
<a class="reference external" href="https://github.com/EdAbati">Edoardo Abati</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> Rename the fitted attribute <code class="docutils literal notranslate"><span class="pre">base_estimator_</span></code> to <code class="docutils literal notranslate"><span class="pre">estimator_</span></code> in
the following classes:
<a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingClassifier.html#sklearn.ensemble.BaggingClassifier" title="sklearn.ensemble.BaggingClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.BaggingRegressor.html#sklearn.ensemble.BaggingRegressor" title="sklearn.ensemble.BaggingRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.BaggingRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.AdaBoostClassifier.html#sklearn.ensemble.AdaBoostClassifier" title="sklearn.ensemble.AdaBoostClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.AdaBoostClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.AdaBoostRegressor.html#sklearn.ensemble.AdaBoostRegressor" title="sklearn.ensemble.AdaBoostRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.AdaBoostRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier" title="sklearn.ensemble.RandomForestClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomForestClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomForestRegressor.html#sklearn.ensemble.RandomForestRegressor" title="sklearn.ensemble.RandomForestRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomForestRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.ExtraTreesClassifier.html#sklearn.ensemble.ExtraTreesClassifier" title="sklearn.ensemble.ExtraTreesClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.ExtraTreesClassifier</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.ExtraTreesRegressor.html#sklearn.ensemble.ExtraTreesRegressor" title="sklearn.ensemble.ExtraTreesRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.ExtraTreesRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.RandomTreesEmbedding.html#sklearn.ensemble.RandomTreesEmbedding" title="sklearn.ensemble.RandomTreesEmbedding"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.RandomTreesEmbedding</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.ensemble.IsolationForest.html#sklearn.ensemble.IsolationForest" title="sklearn.ensemble.IsolationForest"><code class="xref py py-class docutils literal notranslate"><span class="pre">ensemble.IsolationForest</span></code></a>.
<code class="docutils literal notranslate"><span class="pre">base_estimator_</span></code> is deprecated in 1.2 and will be removed in 1.4.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23819">#23819</a> by <a class="reference external" href="https://github.com/trujillo9616">Adrian Trujillo</a> and
<a class="reference external" href="https://github.com/EdAbati">Edoardo Abati</a>.</p></li>
</ul>
</section>
<section id="id16">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.feature_selection" title="sklearn.feature_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_selection</span></code></a><a class="headerlink" href="#id16" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fix a bug in <a class="reference internal" href="../modules/generated/sklearn.feature_selection.mutual_info_regression.html#sklearn.feature_selection.mutual_info_regression" title="sklearn.feature_selection.mutual_info_regression"><code class="xref py py-func docutils literal notranslate"><span class="pre">feature_selection.mutual_info_regression</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.feature_selection.mutual_info_classif.html#sklearn.feature_selection.mutual_info_classif" title="sklearn.feature_selection.mutual_info_classif"><code class="xref py py-func docutils literal notranslate"><span class="pre">feature_selection.mutual_info_classif</span></code></a>, where the continuous features
in <code class="docutils literal notranslate"><span class="pre">X</span></code> should be scaled to a unit variance independently if the target <code class="docutils literal notranslate"><span class="pre">y</span></code> is
continuous or discrete.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24747">#24747</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a></p></li>
</ul>
</section>
<section id="sklearn-gaussian-process">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.gaussian_process" title="sklearn.gaussian_process"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.gaussian_process</span></code></a><a class="headerlink" href="#sklearn-gaussian-process" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fix <a class="reference internal" href="../modules/generated/sklearn.gaussian_process.kernels.Matern.html#sklearn.gaussian_process.kernels.Matern" title="sklearn.gaussian_process.kernels.Matern"><code class="xref py py-class docutils literal notranslate"><span class="pre">gaussian_process.kernels.Matern</span></code></a> gradient computation with
<code class="docutils literal notranslate"><span class="pre">nu=0.5</span></code> for PyPy (and possibly other non CPython interpreters). <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24245">#24245</a>
by <a class="reference external" href="https://github.com/lesteve">Loïc Estève</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> The <code class="docutils literal notranslate"><span class="pre">fit</span></code> method of <a class="reference internal" href="../modules/generated/sklearn.gaussian_process.GaussianProcessRegressor.html#sklearn.gaussian_process.GaussianProcessRegressor" title="sklearn.gaussian_process.GaussianProcessRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">gaussian_process.GaussianProcessRegressor</span></code></a>
will not modify the input X in case a custom kernel is used, with a <code class="docutils literal notranslate"><span class="pre">diag</span></code>
method that returns part of the input X. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24405">#24405</a>
by <a class="reference external" href="https://github.com/OmarManzoor">Omar Salman</a>.</p></li>
</ul>
</section>
<section id="sklearn-impute">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.impute" title="sklearn.impute"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.impute</span></code></a><a class="headerlink" href="#sklearn-impute" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> Added <code class="docutils literal notranslate"><span class="pre">keep_empty_features</span></code> parameter to
<a class="reference internal" href="../modules/generated/sklearn.impute.SimpleImputer.html#sklearn.impute.SimpleImputer" title="sklearn.impute.SimpleImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.SimpleImputer</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.impute.KNNImputer.html#sklearn.impute.KNNImputer" title="sklearn.impute.KNNImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.KNNImputer</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.impute.IterativeImputer.html#sklearn.impute.IterativeImputer" title="sklearn.impute.IterativeImputer"><code class="xref py py-class docutils literal notranslate"><span class="pre">impute.IterativeImputer</span></code></a>, preventing removal of features
containing only missing values when transforming.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/16695">#16695</a> by <a class="reference external" href="https://github.com/vitorsrg">Vitor Santa Rosa</a>.</p></li>
</ul>
</section>
<section id="id17">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.inspection" title="sklearn.inspection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.inspection</span></code></a><a class="headerlink" href="#id17" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Major Feature</span></span> Extended <a class="reference internal" href="../modules/generated/sklearn.inspection.partial_dependence.html#sklearn.inspection.partial_dependence" title="sklearn.inspection.partial_dependence"><code class="xref py py-func docutils literal notranslate"><span class="pre">inspection.partial_dependence</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.inspection.PartialDependenceDisplay.html#sklearn.inspection.PartialDependenceDisplay" title="sklearn.inspection.PartialDependenceDisplay"><code class="xref py py-class docutils literal notranslate"><span class="pre">inspection.PartialDependenceDisplay</span></code></a> to handle categorical features.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/18298">#18298</a> by <a class="reference external" href="https://github.com/madhuracj">Madhura Jayaratne</a> and
<a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.inspection.DecisionBoundaryDisplay.html#sklearn.inspection.DecisionBoundaryDisplay" title="sklearn.inspection.DecisionBoundaryDisplay"><code class="xref py py-class docutils literal notranslate"><span class="pre">inspection.DecisionBoundaryDisplay</span></code></a> now raises error if input
data is not 2-dimensional.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/25077">#25077</a> by <a class="reference external" href="https://github.com/ArturoAmorQ">Arturo Amor</a>.</p></li>
</ul>
</section>
<section id="sklearn-kernel-approximation">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.kernel_approximation" title="sklearn.kernel_approximation"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.kernel_approximation</span></code></a><a class="headerlink" href="#sklearn-kernel-approximation" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.kernel_approximation.RBFSampler.html#sklearn.kernel_approximation.RBFSampler" title="sklearn.kernel_approximation.RBFSampler"><code class="xref py py-class docutils literal notranslate"><span class="pre">kernel_approximation.RBFSampler</span></code></a> now preserves
dtype for <code class="docutils literal notranslate"><span class="pre">numpy.float32</span></code> inputs. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24317">#24317</a> by <code class="docutils literal notranslate"><span class="pre">Tim</span> <span class="pre">Head</span> <span class="pre"><betatim></span></code>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.kernel_approximation.SkewedChi2Sampler.html#sklearn.kernel_approximation.SkewedChi2Sampler" title="sklearn.kernel_approximation.SkewedChi2Sampler"><code class="xref py py-class docutils literal notranslate"><span class="pre">kernel_approximation.SkewedChi2Sampler</span></code></a> now preserves
dtype for <code class="docutils literal notranslate"><span class="pre">numpy.float32</span></code> inputs. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24350">#24350</a> by <a class="reference external" href="https://github.com/rprkh">Rahil Parikh</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.kernel_approximation.RBFSampler.html#sklearn.kernel_approximation.RBFSampler" title="sklearn.kernel_approximation.RBFSampler"><code class="xref py py-class docutils literal notranslate"><span class="pre">kernel_approximation.RBFSampler</span></code></a> now accepts
<code class="docutils literal notranslate"><span class="pre">'scale'</span></code> option for parameter <code class="docutils literal notranslate"><span class="pre">gamma</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24755">#24755</a> by <a class="reference external" href="https://github.com/GLevV">Gleb Levitski</a>.</p></li>
</ul>
</section>
<section id="id18">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.linear_model" title="sklearn.linear_model"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a><a class="headerlink" href="#id18" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegressionCV.html#sklearn.linear_model.LogisticRegressionCV" title="sklearn.linear_model.LogisticRegressionCV"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegressionCV</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.linear_model.GammaRegressor.html#sklearn.linear_model.GammaRegressor" title="sklearn.linear_model.GammaRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.GammaRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.PoissonRegressor.html#sklearn.linear_model.PoissonRegressor" title="sklearn.linear_model.PoissonRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.PoissonRegressor</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.linear_model.TweedieRegressor.html#sklearn.linear_model.TweedieRegressor" title="sklearn.linear_model.TweedieRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.TweedieRegressor</span></code></a> got
a new solver <code class="docutils literal notranslate"><span class="pre">solver="newton-cholesky"</span></code>. This is a 2nd order (Newton) optimisation
routine that uses a Cholesky decomposition of the hessian matrix.
When <code class="docutils literal notranslate"><span class="pre">n_samples</span> <span class="pre">>></span> <span class="pre">n_features</span></code>, the <code class="docutils literal notranslate"><span class="pre">"newton-cholesky"</span></code> solver has been observed to
converge both faster and to a higher precision solution than the <code class="docutils literal notranslate"><span class="pre">"lbfgs"</span></code> solver on
problems with one-hot encoded categorical variables with some rare categorical
levels.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24637">#24637</a> and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24767">#24767</a> by <a class="reference external" href="https://github.com/lorentzenchr">Christian Lorentzen</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.linear_model.GammaRegressor.html#sklearn.linear_model.GammaRegressor" title="sklearn.linear_model.GammaRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.GammaRegressor</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.linear_model.PoissonRegressor.html#sklearn.linear_model.PoissonRegressor" title="sklearn.linear_model.PoissonRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.PoissonRegressor</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.linear_model.TweedieRegressor.html#sklearn.linear_model.TweedieRegressor" title="sklearn.linear_model.TweedieRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.TweedieRegressor</span></code></a>
can reach higher precision with the lbfgs solver, in particular when <code class="docutils literal notranslate"><span class="pre">tol</span></code> is set
to a tiny value. Moreover, <code class="docutils literal notranslate"><span class="pre">verbose</span></code> is now properly propagated to L-BFGS-B.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23619">#23619</a> by <a class="reference external" href="https://github.com/lorentzenchr">Christian Lorentzen</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier" title="sklearn.linear_model.SGDClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDClassifier</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor" title="sklearn.linear_model.SGDRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDRegressor</span></code></a> will
raise an error when all the validation samples have zero sample weight.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23275">#23275</a> by <code class="docutils literal notranslate"><span class="pre">Zhehao</span> <span class="pre">Liu</span> <span class="pre"><MaxwellLZH></span></code>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDOneClassSVM.html#sklearn.linear_model.SGDOneClassSVM" title="sklearn.linear_model.SGDOneClassSVM"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDOneClassSVM</span></code></a> no longer performs parameter
validation in the constructor. All validation is now handled in <code class="docutils literal notranslate"><span class="pre">fit()</span></code> and
<code class="docutils literal notranslate"><span class="pre">partial_fit()</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24433">#24433</a> by <a class="reference external" href="https://github.com/iofall">Yogendrasingh</a>, <a class="reference external" href="https://github.com/arisayosh">Arisa Y.</a>
and <a class="reference external" href="https://github.com/betatim">Tim Head</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-danger">Fix</span></span> Fix average loss calculation when early stopping is enabled in
<a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor" title="sklearn.linear_model.SGDRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDRegressor</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier" title="sklearn.linear_model.SGDClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.SGDClassifier</span></code></a>.
Also updated the condition for early stopping accordingly.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23798">#23798</a> by <a class="reference external" href="https://github.com/Harsh14901">Harsh Agrawal</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> The default value for the <code class="docutils literal notranslate"><span class="pre">solver</span></code> parameter in
<a class="reference internal" href="../modules/generated/sklearn.linear_model.QuantileRegressor.html#sklearn.linear_model.QuantileRegressor" title="sklearn.linear_model.QuantileRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.QuantileRegressor</span></code></a> will change from <code class="docutils literal notranslate"><span class="pre">"interior-point"</span></code>
to <code class="docutils literal notranslate"><span class="pre">"highs"</span></code> in version 1.4.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23637">#23637</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> String option <code class="docutils literal notranslate"><span class="pre">"none"</span></code> is deprecated for <code class="docutils literal notranslate"><span class="pre">penalty</span></code> argument
in <a class="reference internal" href="../modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression" title="sklearn.linear_model.LogisticRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.LogisticRegression</span></code></a>, and will be removed in version 1.4.
Use <code class="docutils literal notranslate"><span class="pre">None</span></code> instead. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23877">#23877</a> by <a class="reference external" href="https://github.com/MaxwellLZH">Zhehao Liu</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> The default value of <code class="docutils literal notranslate"><span class="pre">tol</span></code> was changed from <code class="docutils literal notranslate"><span class="pre">1e-3</span></code> to <code class="docutils literal notranslate"><span class="pre">1e-4</span></code> for
<a class="reference internal" href="../modules/generated/sklearn.linear_model.ridge_regression.html#sklearn.linear_model.ridge_regression" title="sklearn.linear_model.ridge_regression"><code class="xref py py-func docutils literal notranslate"><span class="pre">linear_model.ridge_regression</span></code></a>, <a class="reference internal" href="../modules/generated/sklearn.linear_model.Ridge.html#sklearn.linear_model.Ridge" title="sklearn.linear_model.Ridge"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.Ridge</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.linear_model.RidgeClassifier.html#sklearn.linear_model.RidgeClassifier" title="sklearn.linear_model.RidgeClassifier"><code class="xref py py-class docutils literal notranslate"><span class="pre">linear_model.RidgeClassifier</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24465">#24465</a> by <a class="reference external" href="https://github.com/lorentzenchr">Christian Lorentzen</a>.</p></li>
</ul>
</section>
<section id="id19">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.manifold" title="sklearn.manifold"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.manifold</span></code></a><a class="headerlink" href="#id19" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span> Adds option to use the normalized stress in <a class="reference internal" href="../modules/generated/sklearn.manifold.MDS.html#sklearn.manifold.MDS" title="sklearn.manifold.MDS"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.MDS</span></code></a>. This is
enabled by setting the new <code class="docutils literal notranslate"><span class="pre">normalize</span></code> parameter to <code class="docutils literal notranslate"><span class="pre">True</span></code>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/10168">#10168</a> by <a class="reference external" href="https://github.com/Borchmann">Łukasz Borchmann</a>,
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12285">#12285</a> by <a class="reference external" href="https://github.com/mattmilten">Matthias Miltenberger</a>,
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13042">#13042</a> by <a class="reference external" href="https://github.com/matthieu-pa">Matthieu Parizy</a>,
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/18094">#18094</a> by <a class="reference external" href="https://github.com/rotheconrad">Roth E Conrad</a> and
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/22562">#22562</a> by <a class="reference external" href="https://github.com/micky774">Meekail Zain</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> Adds <code class="docutils literal notranslate"><span class="pre">eigen_tol</span></code> parameter to
<a class="reference internal" href="../modules/generated/sklearn.manifold.SpectralEmbedding.html#sklearn.manifold.SpectralEmbedding" title="sklearn.manifold.SpectralEmbedding"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.SpectralEmbedding</span></code></a>. Both <a class="reference internal" href="../modules/generated/sklearn.manifold.spectral_embedding.html#sklearn.manifold.spectral_embedding" title="sklearn.manifold.spectral_embedding"><code class="xref py py-func docutils literal notranslate"><span class="pre">manifold.spectral_embedding</span></code></a>
and <a class="reference internal" href="../modules/generated/sklearn.manifold.SpectralEmbedding.html#sklearn.manifold.SpectralEmbedding" title="sklearn.manifold.SpectralEmbedding"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.SpectralEmbedding</span></code></a> now propogate <code class="docutils literal notranslate"><span class="pre">eigen_tol</span></code> to all
choices of <code class="docutils literal notranslate"><span class="pre">eigen_solver</span></code>. Includes a new option <code class="docutils literal notranslate"><span class="pre">eigen_tol="auto"</span></code>
and begins deprecation to change the default from <code class="docutils literal notranslate"><span class="pre">eigen_tol=0</span></code> to
<code class="docutils literal notranslate"><span class="pre">eigen_tol="auto"</span></code> in version 1.3.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23210">#23210</a> by <a class="reference external" href="https://github.com/micky774">Meekail Zain</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.manifold.Isomap.html#sklearn.manifold.Isomap" title="sklearn.manifold.Isomap"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.Isomap</span></code></a> now preserves
dtype for <code class="docutils literal notranslate"><span class="pre">np.float32</span></code> inputs. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24714">#24714</a> by <a class="reference external" href="https://github.com/rprkh">Rahil Parikh</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-warning">API Change</span></span> Added an <code class="docutils literal notranslate"><span class="pre">"auto"</span></code> option to the <code class="docutils literal notranslate"><span class="pre">normalized_stress</span></code> argument in
<a class="reference internal" href="../modules/generated/sklearn.manifold.MDS.html#sklearn.manifold.MDS" title="sklearn.manifold.MDS"><code class="xref py py-class docutils literal notranslate"><span class="pre">manifold.MDS</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.manifold.smacof.html#sklearn.manifold.smacof" title="sklearn.manifold.smacof"><code class="xref py py-func docutils literal notranslate"><span class="pre">manifold.smacof</span></code></a>. Note that
<code class="docutils literal notranslate"><span class="pre">normalized_stress</span></code> is only valid for non-metric MDS, therefore the <code class="docutils literal notranslate"><span class="pre">"auto"</span></code>
option enables <code class="docutils literal notranslate"><span class="pre">normalized_stress</span></code> when <code class="docutils literal notranslate"><span class="pre">metric=False</span></code> and disables it when
<code class="docutils literal notranslate"><span class="pre">metric=True</span></code>. <code class="docutils literal notranslate"><span class="pre">"auto"</span></code> will become the default value foor <code class="docutils literal notranslate"><span class="pre">normalized_stress</span></code>
in version 1.4.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/23834">#23834</a> by <a class="reference external" href="https://github.com/micky774">Meekail Zain</a></p></li>
</ul>
</section>
<section id="sklearn-metrics">
<h3><a class="reference internal" href="../modules/classes.html#module-sklearn.metrics" title="sklearn.metrics"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.metrics</span></code></a><a class="headerlink" href="#sklearn-metrics" title="Permalink to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span> <a class="reference internal" href="../modules/generated/sklearn.metrics.ConfusionMatrixDisplay.html#sklearn.metrics.ConfusionMatrixDisplay.from_estimator" title="sklearn.metrics.ConfusionMatrixDisplay.from_estimator"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.ConfusionMatrixDisplay.from_estimator</span></code></a>,
<a class="reference internal" href="../modules/generated/sklearn.metrics.ConfusionMatrixDisplay.html#sklearn.metrics.ConfusionMatrixDisplay.from_predictions" title="sklearn.metrics.ConfusionMatrixDisplay.from_predictions"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.ConfusionMatrixDisplay.from_predictions</span></code></a>, and
<a class="reference internal" href="../modules/generated/sklearn.metrics.ConfusionMatrixDisplay.html#sklearn.metrics.ConfusionMatrixDisplay.plot" title="sklearn.metrics.ConfusionMatrixDisplay.plot"><code class="xref py py-meth docutils literal notranslate"><span class="pre">metrics.ConfusionMatrixDisplay.plot</span></code></a> accepts a <code class="docutils literal notranslate"><span class="pre">text_kw</span></code> parameter which is
passed to matplotlib’s <code class="docutils literal notranslate"><span class="pre">text</span></code> function. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/24051">#24051</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
<li><p><span class="raw-html"><span class="badge badge-success">Feature</span></span> <a class="reference internal" href="../modules/generated/sklearn.metrics.class_likelihood_ratios.html#sklearn.metrics.class_likelihood_ratios" title="sklearn.metrics.class_likelihood_ratios"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.class_likelihood_ratios</span></code></a> is added to compute the positive and
negative likelihood ratios derived from the confusion matrix
of a binary classification problem. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/22518">#22518</a> by
<a class="reference external" href="https://github.com/ArturoAmorQ">Arturo Amor</a>.</p></li>