-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathv0.22.html
1882 lines (1648 loc) · 223 KB
/
v0.22.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>
<html lang="en" data-content_root="../" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta property="og:title" content="Version 0.22" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://scikit-learn/stable/whats_new/v0.22.html" />
<meta property="og:site_name" content="scikit-learn" />
<meta property="og:description" content="For a short description of the main highlights of the release, please refer to Release Highlights for scikit-learn 0.22. Legend for changelogs something big that you couldn’t do before., something ..." />
<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="For a short description of the main highlights of the release, please refer to Release Highlights for scikit-learn 0.22. Legend for changelogs something big that you couldn’t do before., something ..." />
<title>Version 0.22 — scikit-learn 1.5.2 documentation</title>
<script data-cfasync="false">
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
</script>
<!-- Loaded before other Sphinx assets -->
<link href="../_static/styles/theme.css?digest=dfe6caa3a7d634c4db9b" rel="stylesheet" />
<link href="../_static/styles/bootstrap.css?digest=dfe6caa3a7d634c4db9b" rel="stylesheet" />
<link href="../_static/styles/pydata-sphinx-theme.css?digest=dfe6caa3a7d634c4db9b" rel="stylesheet" />
<link href="../_static/vendor/fontawesome/6.5.2/css/all.min.css?digest=dfe6caa3a7d634c4db9b" rel="stylesheet" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="../_static/vendor/fontawesome/6.5.2/webfonts/fa-solid-900.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="../_static/vendor/fontawesome/6.5.2/webfonts/fa-brands-400.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="../_static/vendor/fontawesome/6.5.2/webfonts/fa-regular-400.woff2" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../_static/plot_directive.css" />
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Vibur" />
<link rel="stylesheet" type="text/css" href="../_static/jupyterlite_sphinx.css?v=ca70e7f1" />
<link rel="stylesheet" type="text/css" href="../_static/sg_gallery.css?v=d2d258e8" />
<link rel="stylesheet" type="text/css" href="../_static/sg_gallery-binder.css?v=f4aeca0c" />
<link rel="stylesheet" type="text/css" href="../_static/sg_gallery-dataframe.css?v=2082cf3c" />
<link rel="stylesheet" type="text/css" href="../_static/sg_gallery-rendered-html.css?v=1277b6f3" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=95c83b7e" />
<link rel="stylesheet" type="text/css" href="../_static/styles/colors.css?v=cc94ab7d" />
<link rel="stylesheet" type="text/css" href="../_static/styles/custom.css?v=e4cb1417" />
<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=dfe6caa3a7d634c4db9b" />
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=dfe6caa3a7d634c4db9b" />
<script src="../_static/vendor/fontawesome/6.5.2/js/all.min.js?digest=dfe6caa3a7d634c4db9b"></script>
<script src="../_static/documentation_options.js?v=73275c37"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../_static/copybutton.js?v=97f0b27d"></script>
<script src="../_static/jupyterlite_sphinx.js?v=d6bdf5f8"></script>
<script src="../_static/design-tabs.js?v=f930bc37"></script>
<script data-domain="scikit-learn.org" defer="defer" src="https://views.scientific-python.org/js/script.js"></script>
<script>DOCUMENTATION_OPTIONS.pagename = 'whats_new/v0.22';</script>
<script>
DOCUMENTATION_OPTIONS.theme_version = '0.15.4';
DOCUMENTATION_OPTIONS.theme_switcher_json_url = 'https://scikit-learn.org/dev/_static/versions.json';
DOCUMENTATION_OPTIONS.theme_switcher_version_match = '1.5.2';
DOCUMENTATION_OPTIONS.show_version_warning_banner = true;
</script>
<script src="../_static/scripts/dropdown.js?v=e2048168"></script>
<script src="../_static/scripts/version-switcher.js?v=a6dd8357"></script>
<link rel="canonical" href="https://scikit-learn.org/stable/whats_new/v0.22.html" />
<link rel="icon" href="../_static/favicon.ico"/>
<link rel="author" title="About these documents" href="../about.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Version 0.21" href="v0.21.html" />
<link rel="prev" title="Version 0.23" href="v0.23.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
</head>
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
<div id="pst-scroll-pixel-helper"></div>
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
<input type="checkbox"
class="sidebar-toggle"
id="pst-primary-sidebar-checkbox"/>
<label class="overlay overlay-primary" for="pst-primary-sidebar-checkbox"></label>
<input type="checkbox"
class="sidebar-toggle"
id="pst-secondary-sidebar-checkbox"/>
<label class="overlay overlay-secondary" for="pst-secondary-sidebar-checkbox"></label>
<div class="search-button__wrapper">
<div class="search-button__overlay"></div>
<div class="search-button__search-container">
<form class="bd-search d-flex align-items-center"
action="../search.html"
method="get">
<i class="fa-solid fa-magnifying-glass"></i>
<input type="search"
class="form-control"
name="q"
id="search-input"
placeholder="Search the docs ..."
aria-label="Search the docs ..."
autocomplete="off"
autocorrect="off"
autocapitalize="off"
spellcheck="false"/>
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
</form></div>
</div>
<div class="pst-async-banner-revealer d-none">
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
</div>
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
<div class="bd-header__inner bd-page-width">
<button class="pst-navbar-icon sidebar-toggle primary-toggle" aria-label="Site navigation">
<span class="fa-solid fa-bars"></span>
</button>
<div class=" navbar-header-items__start">
<div class="navbar-item">
<a class="navbar-brand logo" href="../index.html">
<img src="../_static/scikit-learn-logo-small.png" class="logo__image only-light" alt="scikit-learn homepage"/>
<script>document.write(`<img src="../_static/scikit-learn-logo-small.png" class="logo__image only-dark" alt="scikit-learn homepage"/>`);</script>
</a></div>
</div>
<div class=" navbar-header-items">
<div class="me-auto navbar-header-items__center">
<div class="navbar-item">
<nav>
<ul class="bd-navbar-elements navbar-nav">
<li class="nav-item ">
<a class="nav-link nav-internal" href="../install.html">
Install
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../user_guide.html">
User Guide
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../api/index.html">
API
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../auto_examples/index.html">
Examples
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-external" href="https://blog.scikit-learn.org/">
Community
</a>
</li>
<li class="nav-item dropdown">
<button class="btn dropdown-toggle nav-item" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-controls="pst-nav-more-links">
More
</button>
<ul id="pst-nav-more-links" class="dropdown-menu">
<li class=" ">
<a class="nav-link dropdown-item nav-internal" href="../getting_started.html">
Getting Started
</a>
</li>
<li class=" current active">
<a class="nav-link dropdown-item nav-internal" href="../whats_new.html">
Release History
</a>
</li>
<li class=" ">
<a class="nav-link dropdown-item nav-internal" href="../glossary.html">
Glossary
</a>
</li>
<li class=" ">
<a class="nav-link dropdown-item nav-external" href="https://scikit-learn.org/dev/developers/index.html">
Development
</a>
</li>
<li class=" ">
<a class="nav-link dropdown-item nav-internal" href="../faq.html">
FAQ
</a>
</li>
<li class=" ">
<a class="nav-link dropdown-item nav-internal" href="../support.html">
Support
</a>
</li>
<li class=" ">
<a class="nav-link dropdown-item nav-internal" href="../related_projects.html">
Related Projects
</a>
</li>
<li class=" ">
<a class="nav-link dropdown-item nav-internal" href="../roadmap.html">
Roadmap
</a>
</li>
<li class=" ">
<a class="nav-link dropdown-item nav-internal" href="../governance.html">
Governance
</a>
</li>
<li class=" ">
<a class="nav-link dropdown-item nav-internal" href="../about.html">
About us
</a>
</li>
</ul>
</li>
</ul>
</nav></div>
</div>
<div class="navbar-header-items__end">
<div class="navbar-item navbar-persistent--container">
<script>
document.write(`
<button class="btn btn-sm pst-navbar-icon search-button search-button__button" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
<i class="fa-solid fa-magnifying-glass fa-lg"></i>
</button>
`);
</script>
</div>
<div class="navbar-item">
<script>
document.write(`
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button" title="light/dark" aria-label="light/dark" data-bs-placement="bottom" data-bs-toggle="tooltip">
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light"></i>
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark"></i>
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto"></i>
</button>
`);
</script></div>
<div class="navbar-item"><ul class="navbar-icon-links"
aria-label="Icon Links">
<li class="nav-item">
<a href="https://github.com/scikit-learn/scikit-learn" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-square-github fa-lg" aria-hidden="true"></i>
<span class="sr-only">GitHub</span></a>
</li>
</ul></div>
<div class="navbar-item">
<script>
document.write(`
<div class="version-switcher__container dropdown">
<button id="pst-version-switcher-button-2"
type="button"
class="version-switcher__button btn btn-sm dropdown-toggle"
data-bs-toggle="dropdown"
aria-haspopup="listbox"
aria-controls="pst-version-switcher-list-2"
aria-label="Version switcher list"
>
Choose version <!-- this text may get changed later by javascript -->
<span class="caret"></span>
</button>
<div id="pst-version-switcher-list-2"
class="version-switcher__menu dropdown-menu list-group-flush py-0"
role="listbox" aria-labelledby="pst-version-switcher-button-2">
<!-- dropdown will be populated by javascript on page load -->
</div>
</div>
`);
</script></div>
</div>
</div>
<div class="navbar-persistent--mobile">
<script>
document.write(`
<button class="btn btn-sm pst-navbar-icon search-button search-button__button" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
<i class="fa-solid fa-magnifying-glass fa-lg"></i>
</button>
`);
</script>
</div>
<button class="pst-navbar-icon sidebar-toggle secondary-toggle" aria-label="On this page">
<span class="fa-solid fa-outdent"></span>
</button>
</div>
</header>
<div class="bd-container">
<div class="bd-container__inner bd-page-width">
<div class="bd-sidebar-primary bd-sidebar">
<div class="sidebar-header-items sidebar-primary__section">
<div class="sidebar-header-items__center">
<div class="navbar-item">
<nav>
<ul class="bd-navbar-elements navbar-nav">
<li class="nav-item ">
<a class="nav-link nav-internal" href="../install.html">
Install
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../user_guide.html">
User Guide
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../api/index.html">
API
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../auto_examples/index.html">
Examples
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-external" href="https://blog.scikit-learn.org/">
Community
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../getting_started.html">
Getting Started
</a>
</li>
<li class="nav-item current active">
<a class="nav-link nav-internal" href="../whats_new.html">
Release History
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../glossary.html">
Glossary
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-external" href="https://scikit-learn.org/dev/developers/index.html">
Development
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../faq.html">
FAQ
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../support.html">
Support
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../related_projects.html">
Related Projects
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../roadmap.html">
Roadmap
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../governance.html">
Governance
</a>
</li>
<li class="nav-item ">
<a class="nav-link nav-internal" href="../about.html">
About us
</a>
</li>
</ul>
</nav></div>
</div>
<div class="sidebar-header-items__end">
<div class="navbar-item">
<script>
document.write(`
<button class="btn btn-sm nav-link pst-navbar-icon theme-switch-button" title="light/dark" aria-label="light/dark" data-bs-placement="bottom" data-bs-toggle="tooltip">
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light"></i>
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark"></i>
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto"></i>
</button>
`);
</script></div>
<div class="navbar-item"><ul class="navbar-icon-links"
aria-label="Icon Links">
<li class="nav-item">
<a href="https://github.com/scikit-learn/scikit-learn" title="GitHub" class="nav-link pst-navbar-icon" rel="noopener" target="_blank" data-bs-toggle="tooltip" data-bs-placement="bottom"><i class="fa-brands fa-square-github fa-lg" aria-hidden="true"></i>
<span class="sr-only">GitHub</span></a>
</li>
</ul></div>
<div class="navbar-item">
<script>
document.write(`
<div class="version-switcher__container dropdown">
<button id="pst-version-switcher-button-3"
type="button"
class="version-switcher__button btn btn-sm dropdown-toggle"
data-bs-toggle="dropdown"
aria-haspopup="listbox"
aria-controls="pst-version-switcher-list-3"
aria-label="Version switcher list"
>
Choose version <!-- this text may get changed later by javascript -->
<span class="caret"></span>
</button>
<div id="pst-version-switcher-list-3"
class="version-switcher__menu dropdown-menu list-group-flush py-0"
role="listbox" aria-labelledby="pst-version-switcher-button-3">
<!-- dropdown will be populated by javascript on page load -->
</div>
</div>
`);
</script></div>
</div>
</div>
<div class="sidebar-primary-items__start sidebar-primary__section">
<div class="sidebar-primary-item">
<nav class="bd-docs-nav bd-links"
aria-label="Section Navigation">
<p class="bd-links__title" role="heading" aria-level="1">Section Navigation</p>
<div class="bd-toc-item navbar-nav"><ul class="current nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="v1.5.html">Version 1.5</a></li>
<li class="toctree-l1"><a class="reference internal" href="v1.4.html">Version 1.4</a></li>
<li class="toctree-l1"><a class="reference internal" href="v1.3.html">Version 1.3</a></li>
<li class="toctree-l1"><a class="reference internal" href="v1.2.html">Version 1.2</a></li>
<li class="toctree-l1"><a class="reference internal" href="v1.1.html">Version 1.1</a></li>
<li class="toctree-l1"><a class="reference internal" href="v1.0.html">Version 1.0</a></li>
<li class="toctree-l1"><a class="reference internal" href="v0.24.html">Version 0.24</a></li>
<li class="toctree-l1"><a class="reference internal" href="v0.23.html">Version 0.23</a></li>
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Version 0.22</a></li>
<li class="toctree-l1"><a class="reference internal" href="v0.21.html">Version 0.21</a></li>
<li class="toctree-l1"><a class="reference internal" href="v0.20.html">Version 0.20</a></li>
<li class="toctree-l1"><a class="reference internal" href="v0.19.html">Version 0.19</a></li>
<li class="toctree-l1"><a class="reference internal" href="v0.18.html">Version 0.18</a></li>
<li class="toctree-l1"><a class="reference internal" href="v0.17.html">Version 0.17</a></li>
<li class="toctree-l1"><a class="reference internal" href="v0.16.html">Version 0.16</a></li>
<li class="toctree-l1"><a class="reference internal" href="v0.15.html">Version 0.15</a></li>
<li class="toctree-l1"><a class="reference internal" href="v0.14.html">Version 0.14</a></li>
<li class="toctree-l1"><a class="reference internal" href="v0.13.html">Version 0.13</a></li>
<li class="toctree-l1"><a class="reference internal" href="older_versions.html">Older Versions</a></li>
</ul>
</div>
</nav></div>
</div>
<div class="sidebar-primary-items__end sidebar-primary__section">
</div>
<div id="rtd-footer-container"></div>
</div>
<main id="main-content" class="bd-main" role="main">
<div class="bd-content">
<div class="bd-article-container">
<div class="bd-header-article d-print-none">
<div class="header-article-items header-article__inner">
<div class="header-article-items__start">
<div class="header-article-item">
<nav aria-label="Breadcrumb" class="d-print-none">
<ul class="bd-breadcrumbs">
<li class="breadcrumb-item breadcrumb-home">
<a href="../index.html" class="nav-link" aria-label="Home">
<i class="fa-solid fa-home"></i>
</a>
</li>
<li class="breadcrumb-item"><a href="../whats_new.html" class="nav-link">Release History</a></li>
<li class="breadcrumb-item active" aria-current="page">Version 0.22</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<div id="searchbox"></div>
<article class="bd-article">
<section id="version-0-22">
<span id="release-notes-0-22"></span><h1>Version 0.22<a class="headerlink" href="#version-0-22" title="Link to this heading">#</a></h1>
<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_0_22_0.html#sphx-glr-auto-examples-release-highlights-plot-release-highlights-0-22-0-py"><span class="std std-ref">Release Highlights for scikit-learn 0.22</span></a>.</p>
<p class="rubric">Legend for changelogs</p>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-success">Major Feature</span></span> something big that you couldn’t do before.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-success">Feature</span></span> something that you couldn’t do before.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-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 text-bg-info">Enhancement</span></span> a miscellaneous minor improvement.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> something that previously didn’t work as documented – or according
to reasonable expectations – should now work.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-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 id="version-0-22-2-post1">
<span id="changes-0-22-2"></span><h2>Version 0.22.2.post1<a class="headerlink" href="#version-0-22-2-post1" title="Link to this heading">#</a></h2>
<p><strong>March 3 2020</strong></p>
<p>The 0.22.2.post1 release includes a packaging fix for the source distribution
but the content of the packages is otherwise identical to the content of the
wheels with the 0.22.2 version (without the .post1 suffix). Both contain the
following changes.</p>
<section id="changelog">
<h3>Changelog<a class="headerlink" href="#changelog" title="Link to this heading">#</a></h3>
<section id="sklearn-impute">
<h4><a class="reference internal" href="../api/sklearn.impute.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="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-info">Efficiency</span></span> Reduce <a class="reference internal" href="../modules/generated/sklearn.impute.KNNImputer.html#sklearn.impute.KNNImputer" title="sklearn.impute.KNNImputer"><code class="xref py py-func docutils literal notranslate"><span class="pre">impute.KNNImputer</span></code></a> asymptotic memory usage by
chunking pairwise distance computation.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/16397">#16397</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
</ul>
</section>
<section id="sklearn-metrics">
<h4><a class="reference internal" href="../api/sklearn.metrics.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="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> Fixed a bug in <code class="docutils literal notranslate"><span class="pre">metrics.plot_roc_curve</span></code> where
the name of the estimator was passed in the <a class="reference internal" href="../modules/generated/sklearn.metrics.RocCurveDisplay.html#sklearn.metrics.RocCurveDisplay" title="sklearn.metrics.RocCurveDisplay"><code class="xref py py-class docutils literal notranslate"><span class="pre">metrics.RocCurveDisplay</span></code></a>
instead of the parameter <code class="docutils literal notranslate"><span class="pre">name</span></code>. It results in a different plot when calling
<a class="reference internal" href="../modules/generated/sklearn.metrics.RocCurveDisplay.html#sklearn.metrics.RocCurveDisplay.plot" title="sklearn.metrics.RocCurveDisplay.plot"><code class="xref py py-meth docutils literal notranslate"><span class="pre">metrics.RocCurveDisplay.plot</span></code></a> for the subsequent times.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/16500">#16500</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 text-bg-danger">Fix</span></span> Fixed a bug in <code class="docutils literal notranslate"><span class="pre">metrics.plot_precision_recall_curve</span></code> where the
name of the estimator was passed in the
<a class="reference internal" href="../modules/generated/sklearn.metrics.PrecisionRecallDisplay.html#sklearn.metrics.PrecisionRecallDisplay" title="sklearn.metrics.PrecisionRecallDisplay"><code class="xref py py-class docutils literal notranslate"><span class="pre">metrics.PrecisionRecallDisplay</span></code></a> instead of the parameter <code class="docutils literal notranslate"><span class="pre">name</span></code>. It
results in a different plot when calling
<a class="reference internal" href="../modules/generated/sklearn.metrics.PrecisionRecallDisplay.html#sklearn.metrics.PrecisionRecallDisplay.plot" title="sklearn.metrics.PrecisionRecallDisplay.plot"><code class="xref py py-meth docutils literal notranslate"><span class="pre">metrics.PrecisionRecallDisplay.plot</span></code></a> for the subsequent times.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/16505">#16505</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</section>
<section id="sklearn-neighbors">
<h4><a class="reference internal" href="../api/sklearn.neighbors.html#module-sklearn.neighbors" title="sklearn.neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a><a class="headerlink" href="#sklearn-neighbors" title="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> Fix a bug which converted a list of arrays into a 2-D object
array instead of a 1-D array containing NumPy arrays. This bug
was affecting <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-meth docutils literal notranslate"><span class="pre">neighbors.NearestNeighbors.radius_neighbors</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/16076">#16076</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a> and
<a class="reference external" href="https://github.com/alexshacked">Alex Shacked</a>.</p></li>
</ul>
</section>
</section>
</section>
<section id="version-0-22-1">
<span id="changes-0-22-1"></span><h2>Version 0.22.1<a class="headerlink" href="#version-0-22-1" title="Link to this heading">#</a></h2>
<p><strong>January 2 2020</strong></p>
<p>This is a bug-fix release to primarily resolve some packaging issues in version
0.22.0. It also includes minor documentation improvements and some bug fixes.</p>
<section id="id1">
<h3>Changelog<a class="headerlink" href="#id1" title="Link to this heading">#</a></h3>
<section id="sklearn-cluster">
<h4><a class="reference internal" href="../api/sklearn.cluster.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="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-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> with <code class="docutils literal notranslate"><span class="pre">algorithm="elkan"</span></code> now uses the same
stopping criterion as with the default <code class="docutils literal notranslate"><span class="pre">algorithm="full"</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15930">#15930</a> by
<a class="reference external" href="https://github.com/inder128">@inder128</a>.</p></li>
</ul>
</section>
<section id="sklearn-inspection">
<h4><a class="reference internal" href="../api/sklearn.inspection.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="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.inspection.permutation_importance.html#sklearn.inspection.permutation_importance" title="sklearn.inspection.permutation_importance"><code class="xref py py-func docutils literal notranslate"><span class="pre">inspection.permutation_importance</span></code></a> will return the same
<code class="docutils literal notranslate"><span class="pre">importances</span></code> when a <code class="docutils literal notranslate"><span class="pre">random_state</span></code> is given for both <code class="docutils literal notranslate"><span class="pre">n_jobs=1</span></code> or
<code class="docutils literal notranslate"><span class="pre">n_jobs>1</span></code> both with shared memory backends (thread-safety) and
isolated memory, process-based backends.
Also avoid casting the data as object dtype and avoid read-only error
on large dataframes with <code class="docutils literal notranslate"><span class="pre">n_jobs>1</span></code> as reported in <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/15810">#15810</a>.
Follow-up of <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15898">#15898</a> by <a class="reference external" href="https://github.com/shivamgargsya">Shivam Gargsya</a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15933">#15933</a> by <a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a> and <a class="reference external" href="https://twitter.com/ogrisel">Olivier Grisel</a>.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> <code class="docutils literal notranslate"><span class="pre">inspection.plot_partial_dependence</span></code> and
<a class="reference internal" href="../modules/generated/sklearn.inspection.PartialDependenceDisplay.html#sklearn.inspection.PartialDependenceDisplay.plot" title="sklearn.inspection.PartialDependenceDisplay.plot"><code class="xref py py-meth docutils literal notranslate"><span class="pre">inspection.PartialDependenceDisplay.plot</span></code></a> now consistently checks
the number of axes passed in. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15760">#15760</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</section>
<section id="id2">
<h4><a class="reference internal" href="../api/sklearn.metrics.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="#id2" title="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> <code class="docutils literal notranslate"><span class="pre">metrics.plot_confusion_matrix</span></code> now raises error when <code class="docutils literal notranslate"><span class="pre">normalize</span></code>
is invalid. Previously, it runs fine with no normalization.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15888">#15888</a> by <a class="reference external" href="https://github.com/qinhanmin2014">Hanmin Qin</a>.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> <code class="docutils literal notranslate"><span class="pre">metrics.plot_confusion_matrix</span></code> now colors the label color
correctly to maximize contrast with its background. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15936">#15936</a> by
<a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a> and <a class="reference external" href="https://github.com/DizietAsahi">@DizietAsahi</a>.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.metrics.classification_report.html#sklearn.metrics.classification_report" title="sklearn.metrics.classification_report"><code class="xref py py-func docutils literal notranslate"><span class="pre">metrics.classification_report</span></code></a> does no longer ignore the
value of the <code class="docutils literal notranslate"><span class="pre">zero_division</span></code> keyword argument. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15879">#15879</a>
by <a class="reference external" href="https://github.com/Bibyutatsu">Bibhash Chandra Mitra</a>.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> Fixed a bug in <code class="docutils literal notranslate"><span class="pre">metrics.plot_confusion_matrix</span></code> to correctly
pass the <code class="docutils literal notranslate"><span class="pre">values_format</span></code> parameter to the <a class="reference internal" href="../modules/generated/sklearn.metrics.ConfusionMatrixDisplay.html#sklearn.metrics.ConfusionMatrixDisplay" title="sklearn.metrics.ConfusionMatrixDisplay"><code class="xref py py-class docutils literal notranslate"><span class="pre">metrics.ConfusionMatrixDisplay</span></code></a>
plot() call. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15937">#15937</a> by <a class="reference external" href="https://github.com/blynotes">Stephen Blystone</a>.</p></li>
</ul>
</section>
<section id="sklearn-model-selection">
<h4><a class="reference internal" href="../api/sklearn.model_selection.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="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> <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> accept scalar values provided in
<code class="docutils literal notranslate"><span class="pre">fit_params</span></code>. Change in 0.22 was breaking backward compatibility.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15863">#15863</a> by <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a> and
<a class="reference external" href="https://github.com/glemaitre">Guillaume Lemaitre</a>.</p></li>
</ul>
</section>
<section id="sklearn-naive-bayes">
<h4><a class="reference internal" href="../api/sklearn.naive_bayes.html#module-sklearn.naive_bayes" title="sklearn.naive_bayes"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.naive_bayes</span></code></a><a class="headerlink" href="#sklearn-naive-bayes" title="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> Removed <code class="docutils literal notranslate"><span class="pre">abstractmethod</span></code> decorator for the method <code class="docutils literal notranslate"><span class="pre">_check_X</span></code> in
<code class="docutils literal notranslate"><span class="pre">naive_bayes.BaseNB</span></code> that could break downstream projects inheriting
from this deprecated public base class. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15996">#15996</a> by
<a class="reference external" href="https://github.com/bsipocz">Brigitta Sipőcz</a>.</p></li>
</ul>
</section>
<section id="sklearn-preprocessing">
<h4><a class="reference internal" href="../api/sklearn.preprocessing.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="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.preprocessing.QuantileTransformer.html#sklearn.preprocessing.QuantileTransformer" title="sklearn.preprocessing.QuantileTransformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">preprocessing.QuantileTransformer</span></code></a> now guarantees the
<code class="docutils literal notranslate"><span class="pre">quantiles_</span></code> attribute to be completely sorted in non-decreasing manner.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15751">#15751</a> by <a class="reference external" href="https://github.com/tirthasheshpatel">Tirth Patel</a>.</p></li>
</ul>
</section>
<section id="sklearn-semi-supervised">
<h4><a class="reference internal" href="../api/sklearn.semi_supervised.html#module-sklearn.semi_supervised" title="sklearn.semi_supervised"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.semi_supervised</span></code></a><a class="headerlink" href="#sklearn-semi-supervised" title="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> <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">semi_supervised.LabelPropagation</span></code></a> and
<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">semi_supervised.LabelSpreading</span></code></a> now allow callable kernel function to
return sparse weight matrix.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15868">#15868</a> by <a class="reference external" href="https://github.com/nik-sm">Niklas Smedemark-Margulies</a>.</p></li>
</ul>
</section>
<section id="sklearn-utils">
<h4><a class="reference internal" href="../api/sklearn.utils.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="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> <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> now correctly converts pandas DataFrame with
boolean columns to floats. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15797">#15797</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 text-bg-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.utils.validation.check_is_fitted.html#sklearn.utils.validation.check_is_fitted" title="sklearn.utils.validation.check_is_fitted"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.validation.check_is_fitted</span></code></a> accepts back an explicit <code class="docutils literal notranslate"><span class="pre">attributes</span></code>
argument to check for specific attributes as explicit markers of a fitted
estimator. When no explicit <code class="docutils literal notranslate"><span class="pre">attributes</span></code> are provided, only the attributes
that end with a underscore and do not start with double underscore are used
as “fitted” markers. The <code class="docutils literal notranslate"><span class="pre">all_or_any</span></code> argument is also no longer
deprecated. This change is made to restore some backward compatibility with
the behavior of this utility in version 0.21. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15947">#15947</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</section>
</section>
</section>
<section id="version-0-22-0">
<span id="changes-0-22"></span><h2>Version 0.22.0<a class="headerlink" href="#version-0-22-0" title="Link to this heading">#</a></h2>
<p><strong>December 3 2019</strong></p>
<section id="website-update">
<h3>Website update<a class="headerlink" href="#website-update" title="Link to this heading">#</a></h3>
<p><a class="reference external" href="https://scikit-learn.org/">Our website</a> was revamped and given a fresh
new look. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14849">#14849</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p>
</section>
<section id="clear-definition-of-the-public-api">
<h3>Clear definition of the public API<a class="headerlink" href="#clear-definition-of-the-public-api" title="Link to this heading">#</a></h3>
<p>Scikit-learn has a public API, and a private API.</p>
<p>We do our best not to break the public API, and to only introduce
backward-compatible changes that do not require any user action. However, in
cases where that’s not possible, any change to the public API is subject to
a deprecation cycle of two minor versions. The private API isn’t publicly
documented and isn’t subject to any deprecation cycle, so users should not
rely on its stability.</p>
<p>A function or object is public if it is documented in the <a class="reference external" href="https://scikit-learn.org/dev/modules/classes.html">API Reference</a> and if it can be
imported with an import path without leading underscores. For example
<code class="docutils literal notranslate"><span class="pre">sklearn.pipeline.make_pipeline</span></code> is public, while
<code class="docutils literal notranslate"><span class="pre">sklearn.pipeline._name_estimators</span></code> is private.
<code class="docutils literal notranslate"><span class="pre">sklearn.ensemble._gb.BaseEnsemble</span></code> is private too because the whole <code class="docutils literal notranslate"><span class="pre">_gb</span></code>
module is private.</p>
<p>Up to 0.22, some tools were de-facto public (no leading underscore), while
they should have been private in the first place. In version 0.22, these
tools have been made properly private, and the public API space has been
cleaned. In addition, importing from most sub-modules is now deprecated: you
should for example use <code class="docutils literal notranslate"><span class="pre">from</span> <span class="pre">sklearn.cluster</span> <span class="pre">import</span> <span class="pre">Birch</span></code> instead of
<code class="docutils literal notranslate"><span class="pre">from</span> <span class="pre">sklearn.cluster.birch</span> <span class="pre">import</span> <span class="pre">Birch</span></code> (in practice, <code class="docutils literal notranslate"><span class="pre">birch.py</span></code> has
been moved to <code class="docutils literal notranslate"><span class="pre">_birch.py</span></code>).</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>All the tools in the public API should be documented in the <a class="reference external" href="https://scikit-learn.org/dev/modules/classes.html">API
Reference</a>. If you
find a public tool (without leading underscore) that isn’t in the API
reference, that means it should either be private or documented. Please
let us know by opening an issue!</p>
</div>
<p>This work was tracked in <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/9250">issue 9250</a> and <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12927">issue
12927</a>.</p>
</section>
<section id="deprecations-using-futurewarning-from-now-on">
<h3>Deprecations: using <code class="docutils literal notranslate"><span class="pre">FutureWarning</span></code> from now on<a class="headerlink" href="#deprecations-using-futurewarning-from-now-on" title="Link to this heading">#</a></h3>
<p>When deprecating a feature, previous versions of scikit-learn used to raise
a <code class="docutils literal notranslate"><span class="pre">DeprecationWarning</span></code>. Since the <code class="docutils literal notranslate"><span class="pre">DeprecationWarnings</span></code> aren’t shown by
default by Python, scikit-learn needed to resort to a custom warning filter
to always show the warnings. That filter would sometimes interfere
with users custom warning filters.</p>
<p>Starting from version 0.22, scikit-learn will show <code class="docutils literal notranslate"><span class="pre">FutureWarnings</span></code> for
deprecations, <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#FutureWarning">as recommended by the Python documentation</a>.
<code class="docutils literal notranslate"><span class="pre">FutureWarnings</span></code> are always shown by default by Python, so the custom
filter has been removed and scikit-learn no longer hinders with user
filters. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15080">#15080</a> by <a class="reference external" href="https://github.com/NicolasHug">Nicolas Hug</a>.</p>
</section>
<section id="changed-models">
<h3>Changed models<a class="headerlink" href="#changed-models" title="Link to this heading">#</a></h3>
<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><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> when <code class="docutils literal notranslate"><span class="pre">n_jobs=1</span></code>. <span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> </p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.decomposition.SparseCoder.html#sklearn.decomposition.SparseCoder" title="sklearn.decomposition.SparseCoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.SparseCoder</span></code></a>,
<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>, and
<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> <span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> </p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.decomposition.SparseCoder.html#sklearn.decomposition.SparseCoder" title="sklearn.decomposition.SparseCoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.SparseCoder</span></code></a> with <code class="docutils literal notranslate"><span class="pre">algorithm='lasso_lars'</span></code> <span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> </p></li>
<li><p><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> where <code class="docutils literal notranslate"><span class="pre">normalize_components</span></code> has no effect
due to deprecation.</p></li>
<li><p><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> <span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> , <span class="raw-html"><span class="badge text-bg-success">Feature</span></span> ,
<span class="raw-html"><span class="badge text-bg-info">Enhancement</span></span> .</p></li>
<li><p><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> when <code class="docutils literal notranslate"><span class="pre">X</span></code> has features with no missing
values. <span class="raw-html"><span class="badge text-bg-success">Feature</span></span> </p></li>
<li><p><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> when <code class="docutils literal notranslate"><span class="pre">X</span></code> is sparse. <span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> </p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.model_selection.StratifiedKFold.html#sklearn.model_selection.StratifiedKFold" title="sklearn.model_selection.StratifiedKFold"><code class="xref py py-class docutils literal notranslate"><span class="pre">model_selection.StratifiedKFold</span></code></a> and any use of <code class="docutils literal notranslate"><span class="pre">cv=int</span></code> with a
classifier. <span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> </p></li>
<li><p><a class="reference internal" href="../modules/generated/sklearn.cross_decomposition.CCA.html#sklearn.cross_decomposition.CCA" title="sklearn.cross_decomposition.CCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">cross_decomposition.CCA</span></code></a> when using scipy >= 1.3 <span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> </p></li>
</ul>
<p>Details are listed in the changelog below.</p>
<p>(While we are trying to better inform users by providing this information, we
cannot assure that this list is complete.)</p>
</section>
<section id="id4">
<h3>Changelog<a class="headerlink" href="#id4" title="Link to this heading">#</a></h3>
<section id="sklearn-base">
<h4><a class="reference internal" href="../api/sklearn.base.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="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-warning">API Change</span></span> From version 0.24 <a class="reference internal" href="../modules/generated/sklearn.base.BaseEstimator.html#sklearn.base.BaseEstimator.get_params" title="sklearn.base.BaseEstimator.get_params"><code class="xref py py-meth docutils literal notranslate"><span class="pre">base.BaseEstimator.get_params</span></code></a> will raise an
AttributeError rather than return None for parameters that are in the
estimator’s constructor but not stored as attributes on the instance.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14464">#14464</a> by <a class="reference external" href="https://joelnothman.com/">Joel Nothman</a>.</p></li>
</ul>
</section>
<section id="sklearn-calibration">
<h4><a class="reference internal" href="../api/sklearn.calibration.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="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> Fixed a bug that made <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> fail when
given a <code class="docutils literal notranslate"><span class="pre">sample_weight</span></code> parameter of type <code class="docutils literal notranslate"><span class="pre">list</span></code> (in the case where
<code class="docutils literal notranslate"><span class="pre">sample_weights</span></code> are not supported by the wrapped estimator). <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13575">#13575</a>
by <a class="reference external" href="https://github.com/wdevazelhes">William de Vazelhes</a>.</p></li>
</ul>
</section>
<section id="id5">
<h4><a class="reference internal" href="../api/sklearn.cluster.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="#id5" title="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-success">Feature</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> now accepts precomputed sparse
neighbors graph as input. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/10482">#10482</a> by <a class="reference external" href="https://github.com/TomDLT">Tom Dupre la Tour</a> and
<a class="reference external" href="https://github.com/thechargedneutron">Kumar Ashutosh</a>.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-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> now accepts a <code class="docutils literal notranslate"><span class="pre">n_components</span></code>
parameter. This parameter extends <code class="docutils literal notranslate"><span class="pre">SpectralClustering</span></code> class functionality to
match <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-meth docutils literal notranslate"><span class="pre">cluster.spectral_clustering</span></code></a>.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13726">#13726</a> by <a class="reference external" href="https://github.com/fdas3213">Shuzhe Xiao</a>.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> Fixed a bug where <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> produced inconsistent results
between <code class="docutils literal notranslate"><span class="pre">n_jobs=1</span></code> and <code class="docutils literal notranslate"><span class="pre">n_jobs>1</span></code> due to the handling of the random state.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/9288">#9288</a> by <a class="reference external" href="https://github.com/bryanyang0528">Bryan Yang</a>.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> Fixed a bug where <code class="docutils literal notranslate"><span class="pre">elkan</span></code> algorithm in <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> was
producing Segmentation Fault on large arrays due to integer index overflow.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15057">#15057</a> by <a class="reference external" href="https://github.com/balodja">Vladimir Korolev</a>.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> <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">MeanShift</span></code></a> now accepts a <a class="reference internal" href="../glossary.html#term-max_iter"><span class="xref std std-term">max_iter</span></a> with a
default value of 300 instead of always using the default 300. It also now
exposes an <code class="docutils literal notranslate"><span class="pre">n_iter_</span></code> indicating the maximum number of iterations performed
on each seed. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15120">#15120</a> by <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> <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
<a class="reference internal" href="../modules/generated/sklearn.cluster.FeatureAgglomeration.html#sklearn.cluster.FeatureAgglomeration" title="sklearn.cluster.FeatureAgglomeration"><code class="xref py py-class docutils literal notranslate"><span class="pre">cluster.FeatureAgglomeration</span></code></a> now raise an error if
<code class="docutils literal notranslate"><span class="pre">affinity='cosine'</span></code> and <code class="docutils literal notranslate"><span class="pre">X</span></code> has samples that are all-zeros. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/7943">#7943</a> by
<a class="reference external" href="https://github.com/mthorrell">@mthorrell</a>.</p></li>
</ul>
</section>
<section id="sklearn-compose">
<h4><a class="reference internal" href="../api/sklearn.compose.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="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-success">Feature</span></span> Adds <a class="reference internal" href="../modules/generated/sklearn.compose.make_column_selector.html#sklearn.compose.make_column_selector" title="sklearn.compose.make_column_selector"><code class="xref py py-func docutils literal notranslate"><span class="pre">compose.make_column_selector</span></code></a> which is used with
<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> to select DataFrame columns on the basis
of name and dtype. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12303">#12303</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 text-bg-danger">Fix</span></span> Fixed 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 failed to
select the proper columns when using a boolean list, with NumPy older than
1.12.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14510">#14510</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 text-bg-danger">Fix</span></span> Fixed a bug in <a class="reference internal" href="../modules/generated/sklearn.compose.TransformedTargetRegressor.html#sklearn.compose.TransformedTargetRegressor" title="sklearn.compose.TransformedTargetRegressor"><code class="xref py py-class docutils literal notranslate"><span class="pre">compose.TransformedTargetRegressor</span></code></a> which did not
pass <code class="docutils literal notranslate"><span class="pre">**fit_params</span></code> to the underlying regressor.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14890">#14890</a> by <a class="reference external" href="https://github.com/mfcabrera">Miguel Cabrera</a>.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> The <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> now requires the number of
features to be consistent between <code class="docutils literal notranslate"><span class="pre">fit</span></code> and <code class="docutils literal notranslate"><span class="pre">transform</span></code>. A <code class="docutils literal notranslate"><span class="pre">FutureWarning</span></code>
is raised now, and this will raise an error in 0.24. If the number of
features isn’t consistent and negative indexing is used, an error is
raised. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14544">#14544</a> by <a class="reference external" href="https://github.com/adrinjalali">Adrin Jalali</a>.</p></li>
</ul>
</section>
<section id="sklearn-cross-decomposition">
<h4><a class="reference internal" href="../api/sklearn.cross_decomposition.html#module-sklearn.cross_decomposition" title="sklearn.cross_decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cross_decomposition</span></code></a><a class="headerlink" href="#sklearn-cross-decomposition" title="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-success">Feature</span></span> <a class="reference internal" href="../modules/generated/sklearn.cross_decomposition.PLSCanonical.html#sklearn.cross_decomposition.PLSCanonical" title="sklearn.cross_decomposition.PLSCanonical"><code class="xref py py-class docutils literal notranslate"><span class="pre">cross_decomposition.PLSCanonical</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.cross_decomposition.PLSRegression.html#sklearn.cross_decomposition.PLSRegression" title="sklearn.cross_decomposition.PLSRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">cross_decomposition.PLSRegression</span></code></a> have a new function
<code class="docutils literal notranslate"><span class="pre">inverse_transform</span></code> to transform data to the original space.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15304">#15304</a> by <a class="reference external" href="https://github.com/jiwidi">Jaime Ferrando Huertas</a>.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.decomposition.KernelPCA.html#sklearn.decomposition.KernelPCA" title="sklearn.decomposition.KernelPCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">decomposition.KernelPCA</span></code></a> now properly checks the
eigenvalues found by the solver for numerical or conditioning issues. This
ensures consistency of results across solvers (different choices for
<code class="docutils literal notranslate"><span class="pre">eigen_solver</span></code>), including approximate solvers such as <code class="docutils literal notranslate"><span class="pre">'randomized'</span></code> and
<code class="docutils literal notranslate"><span class="pre">'lobpcg'</span></code> (see <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/12068">#12068</a>).
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/12145">#12145</a> by <a class="reference external" href="https://github.com/smarie">Sylvain Marié</a></p></li>
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> Fixed a bug where <a class="reference internal" href="../modules/generated/sklearn.cross_decomposition.PLSCanonical.html#sklearn.cross_decomposition.PLSCanonical" title="sklearn.cross_decomposition.PLSCanonical"><code class="xref py py-class docutils literal notranslate"><span class="pre">cross_decomposition.PLSCanonical</span></code></a> and
<a class="reference internal" href="../modules/generated/sklearn.cross_decomposition.PLSRegression.html#sklearn.cross_decomposition.PLSRegression" title="sklearn.cross_decomposition.PLSRegression"><code class="xref py py-class docutils literal notranslate"><span class="pre">cross_decomposition.PLSRegression</span></code></a> were raising an error when fitted
with a target matrix <code class="docutils literal notranslate"><span class="pre">Y</span></code> in which the first column was constant.
<a class="reference external" href="https://github.com/scikit-learn/scikit-learn/issues/13609">#13609</a> by <a class="reference external" href="https://github.com/camilaagw">Camila Williamson</a>.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-danger">Fix</span></span> <a class="reference internal" href="../modules/generated/sklearn.cross_decomposition.CCA.html#sklearn.cross_decomposition.CCA" title="sklearn.cross_decomposition.CCA"><code class="xref py py-class docutils literal notranslate"><span class="pre">cross_decomposition.CCA</span></code></a> now produces the same results with
scipy 1.3 and previous scipy versions. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15661">#15661</a> by <a class="reference external" href="https://github.com/thomasjpfan">Thomas Fan</a>.</p></li>
</ul>
</section>
<section id="sklearn-datasets">
<h4><a class="reference internal" href="../api/sklearn.datasets.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="Link to this heading">#</a></h4>
<ul class="simple">
<li><p><span class="raw-html"><span class="badge text-bg-success">Feature</span></span> <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> now supports heterogeneous data using
pandas by setting <code class="docutils literal notranslate"><span class="pre">as_frame=True</span></code>. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/13902">#13902</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 text-bg-success">Feature</span></span> <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> now includes the <code class="docutils literal notranslate"><span class="pre">target_names</span></code> in
the returned Bunch. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/15160">#15160</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 text-bg-info">Enhancement</span></span> The parameter <code class="docutils literal notranslate"><span class="pre">return_X_y</span></code> was added to
<a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_20newsgroups.html#sklearn.datasets.fetch_20newsgroups" title="sklearn.datasets.fetch_20newsgroups"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_20newsgroups</span></code></a> and <a class="reference internal" href="../modules/generated/sklearn.datasets.fetch_olivetti_faces.html#sklearn.datasets.fetch_olivetti_faces" title="sklearn.datasets.fetch_olivetti_faces"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.fetch_olivetti_faces</span></code></a>
. <a class="reference external" href="https://github.com/scikit-learn/scikit-learn/pull/14259">#14259</a> by <a class="reference external" href="https://github.com/souravsingh">Sourav Singh</a>.</p></li>
<li><p><span class="raw-html"><span class="badge text-bg-info">Enhancement</span></span> <a class="reference internal" href="../modules/generated/sklearn.datasets.make_classification.html#sklearn.datasets.make_classification" title="sklearn.datasets.make_classification"><code class="xref py py-func docutils literal notranslate"><span class="pre">datasets.make_classification</span></code></a> now accepts array-like
<code class="docutils literal notranslate"><span class="pre">weights</span></code> parameter, i.e. list or numpy.array, instead of list only.