-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExplainableBoostingClassifier.html
More file actions
1167 lines (992 loc) · 84 KB
/
Copy pathExplainableBoostingClassifier.html
File metadata and controls
1167 lines (992 loc) · 84 KB
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="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>ExplainableBoostingClassifier — InterpretML 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" />
<link rel="stylesheet" href="../../_static/styles/sphinx-book-theme.css?digest=14f4ca6b54d191a8c7657f6c759bf11a5fb86285" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css" />
<link rel="stylesheet" type="text/css" href="../../_static/design-style.4045f2051d55cab465a707391d5b2007.min.css" />
<!-- 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 data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/clipboard.min.js"></script>
<script src="../../_static/copybutton.js"></script>
<script src="../../_static/scripts/sphinx-book-theme.js?digest=5a5c038af52cf7bc1a1ec88eea08e6366ee68824"></script>
<script>let toggleHintShow = 'Click to show';</script>
<script>let toggleHintHide = 'Click to hide';</script>
<script>let toggleOpenOnPrint = 'true';</script>
<script src="../../_static/togglebutton.js"></script>
<script>var togglebuttonSelector = '.toggle, .admonition.dropdown';</script>
<script src="../../_static/design-tabs.js"></script>
<script>const THEBE_JS_URL = "https://unpkg.com/thebe@0.8.2/lib/index.js"
const thebe_selector = ".thebe,.cell"
const thebe_selector_input = "pre"
const thebe_selector_output = ".output, .cell_output"
</script>
<script async="async" src="../../_static/sphinx-thebe.js"></script>
<script>DOCUMENTATION_OPTIONS.pagename = 'python/api/ExplainableBoostingClassifier';</script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="ExplainableBoostingRegressor" href="ExplainableBoostingRegressor.html" />
<link rel="prev" title="interpret.glassbox" href="interpret-glassbox.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 this book..."
aria-label="Search this book..."
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">
</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>
<div class="sidebar-primary-items__start sidebar-primary__section">
<div class="sidebar-primary-item">
<a class="navbar-brand logo" href="../../index.html">
<img src="../../_static/logo.png" class="logo__image only-light" alt="InterpretML documentation - Home"/>
<script>document.write(`<img src="../../_static/logo.png" class="logo__image only-dark" alt="InterpretML documentation - Home"/>`);</script>
</a></div>
<div class="sidebar-primary-item"><nav class="bd-links" id="bd-docs-nav" aria-label="Main">
<div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1">
<a class="reference internal" href="../../index.html">
Getting Started
</a>
</li>
</ul>
<ul class="current nav bd-sidenav">
<li class="toctree-l1 current active has-children"><a class="reference internal" href="../../interpret.html">API Reference</a><details open="open"><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul class="current">
<li class="toctree-l2 current active has-children"><a class="reference internal" href="interpret-glassbox.html">interpret.glassbox</a><details open="open"><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul class="current">
<li class="toctree-l3 current active"><a class="current reference internal" href="#">ExplainableBoostingClassifier</a></li>
<li class="toctree-l3"><a class="reference internal" href="ExplainableBoostingRegressor.html">ExplainableBoostingRegressor</a></li>
<li class="toctree-l3"><a class="reference internal" href="APLRRegressor.html">APLRRegressor</a></li>
<li class="toctree-l3"><a class="reference internal" href="APLRClassifier.html">APLRClassifier</a></li>
<li class="toctree-l3"><a class="reference internal" href="LogisticRegression.html">LogisticRegression</a></li>
<li class="toctree-l3"><a class="reference internal" href="LinearRegression.html">LinearRegression</a></li>
<li class="toctree-l3"><a class="reference internal" href="ClassificationTree.html">ClassificationTree</a></li>
<li class="toctree-l3"><a class="reference internal" href="RegressionTree.html">RegressionTree</a></li>
<li class="toctree-l3"><a class="reference internal" href="merge_ebms.html">merge_ebms</a></li>
</ul>
</details></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="interpret-blackbox.html">interpret.blackbox</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l3"><a class="reference internal" href="ShapKernel.html">ShapKernel</a></li>
<li class="toctree-l3"><a class="reference internal" href="LimeTabular.html">LimeTabular</a></li>
<li class="toctree-l3"><a class="reference internal" href="PartialDependence.html">PartialDependence</a></li>
<li class="toctree-l3"><a class="reference internal" href="MorrisSensitivity.html">MorrisSensitivity</a></li>
</ul>
</details></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="interpret-greybox.html">interpret.greybox</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l3"><a class="reference internal" href="ShapTree.html">ShapTree</a></li>
</ul>
</details></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="interpret-perf.html">interpret.perf</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l3"><a class="reference internal" href="RegressionPerf.html">RegressionPerf</a></li>
<li class="toctree-l3"><a class="reference internal" href="ROC.html">ROC</a></li>
<li class="toctree-l3"><a class="reference internal" href="PR.html">PR</a></li>
</ul>
</details></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="interpret-data.html">interpret.data</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l3"><a class="reference internal" href="ClassHistogram.html">ClassHistogram</a></li>
<li class="toctree-l3"><a class="reference internal" href="Marginal.html">Marginal</a></li>
</ul>
</details></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="interpret-privacy.html">interpret.privacy</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l3"><a class="reference internal" href="DPExplainableBoostingClassifier.html">DPExplainableBoostingClassifier</a></li>
<li class="toctree-l3"><a class="reference internal" href="DPExplainableBoostingRegressor.html">DPExplainableBoostingRegressor</a></li>
</ul>
</details></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="interpret-utils.html">interpret.utils</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l3"><a class="reference internal" href="link_func.html">link_func</a></li>
<li class="toctree-l3"><a class="reference internal" href="inv_link.html">inv_link</a></li>
<li class="toctree-l3"><a class="reference internal" href="measure_interactions.html">measure_interactions</a></li>
<li class="toctree-l3"><a class="reference internal" href="purify.html">purify</a></li>
</ul>
</details></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="interpret-develop.html">interpret.develop</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l3"><a class="reference internal" href="debug_mode.html">debug_mode</a></li>
</ul>
</details></li>
<li class="toctree-l2"><a class="reference internal" href="show.html">show</a></li>
<li class="toctree-l2"><a class="reference internal" href="show_link.html">show_link</a></li>
<li class="toctree-l2"><a class="reference internal" href="set_show_addr.html">set_show_addr</a></li>
<li class="toctree-l2"><a class="reference internal" href="get_show_addr.html">get_show_addr</a></li>
<li class="toctree-l2"><a class="reference internal" href="preserve.html">preserve</a></li>
<li class="toctree-l2"><a class="reference internal" href="shutdown_show_server.html">shutdown_show_server</a></li>
<li class="toctree-l2"><a class="reference internal" href="init_show_server.html">init_show_server</a></li>
<li class="toctree-l2"><a class="reference internal" href="status_show_server.html">status_show_server</a></li>
<li class="toctree-l2"><a class="reference internal" href="set_visualize_provider.html">set_visualize_provider</a></li>
<li class="toctree-l2"><a class="reference internal" href="get_visualize_provider.html">get_visualize_provider</a></li>
</ul>
</details></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="../../algorithms.html">Algorithms</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../glassbox.html">Glassbox Models</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l3"><a class="reference internal" href="../../ebm.html">Explainable Boosting Machine</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../aplr.html">Automatic Piecewise Linear Regression (APLR)</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../lr.html">Linear Model</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../dt.html">Decision Tree</a></li>
</ul>
</details></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../blackbox.html">Blackbox Explainers</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l3"><a class="reference internal" href="../../shap.html">Shapley Additive Explanations</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../lime.html">Local Interpretable Model-agnostic Explanations</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../pdp.html">Partial Dependence Plot</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../msa.html">Morris Sensitivity Analysis</a></li>
</ul>
</details></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../privacy.html">Differentially Private Models</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l3"><a class="reference internal" href="../../dpebm.html">Differentially Private EBMs</a></li>
</ul>
</details></li>
</ul>
</details></li>
<li class="toctree-l1"><a class="reference internal" href="../../hyperparameters.html">Hyperparameters</a></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="../../ebm-internals.html">EBM internals</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l2"><a class="reference internal" href="../../ebm-internals-regression.html">EBM Internals - Regression</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../ebm-internals-classification.html">EBM Internals - Binary classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../ebm-internals-multiclass.html">EBM Internals - Multiclass</a></li>
</ul>
</details></li>
<li class="toctree-l1"><a class="reference internal" href="../../framework.html">Visualizations</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../deployment-guide.html">Deployments</a></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="../../development.html">Development</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l2"><a class="reference internal" href="../../installation-guide.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../debugging-guide.html">Logging and Debugging</a></li>
</ul>
</details></li>
<li class="toctree-l1"><a class="reference internal" href="../../faq.html">What the FAQ</a></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="../../examples.html">Examples</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l2"><a class="reference internal" href="../examples/interpretable-classification.html">Interpretable Classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples/interpretable-regression.html">Interpretable Regression</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples/interpretable-regression-synthetic.html">Smoothing EBMs</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples/explain-blackbox-classifiers.html">Explain Blackbox Classifiers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples/explain-blackbox-regressors.html">Explain Blackbox Regressors</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples/merge-ebms.html">Merging EBMs</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples/custom-interactions.html">Custom Interactions</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples/differential-privacy.html">Differential Privacy</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples/group-importances.html">Group Importances</a></li>
<li class="toctree-l2"><a class="reference internal" href="../examples/prototype-selection.html">Prototype Selection</a></li>
</ul>
</details></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="sbt-scroll-pixel-helper"></div>
<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"><label class="sidebar-toggle primary-toggle btn btn-sm" for="__primary" title="Toggle primary sidebar" data-bs-placement="bottom" data-bs-toggle="tooltip">
<span class="fa-solid fa-bars"></span>
</label></div>
</div>
<div class="header-article-items__end">
<div class="header-article-item">
<div class="article-header-buttons">
<div class="dropdown dropdown-download-buttons">
<button class="btn dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Download this page">
<i class="fas fa-download"></i>
</button>
<ul class="dropdown-menu">
<li><a href="../../_sources/python/api/ExplainableBoostingClassifier.ipynb" target="_blank"
class="btn btn-sm btn-download-source-button dropdown-item"
title="Download source file"
data-bs-placement="left" data-bs-toggle="tooltip"
>
<span class="btn__icon-container">
<i class="fas fa-file"></i>
</span>
<span class="btn__text-container">.ipynb</span>
</a>
</li>
<li>
<button onclick="window.print()"
class="btn btn-sm btn-download-pdf-button dropdown-item"
title="Print to PDF"
data-bs-placement="left" data-bs-toggle="tooltip"
>
<span class="btn__icon-container">
<i class="fas fa-file-pdf"></i>
</span>
<span class="btn__text-container">.pdf</span>
</button>
</li>
</ul>
</div>
<button onclick="toggleFullScreen()"
class="btn btn-sm btn-fullscreen-button"
title="Fullscreen mode"
data-bs-placement="bottom" data-bs-toggle="tooltip"
>
<span class="btn__icon-container">
<i class="fas fa-expand"></i>
</span>
</button>
<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>
<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>
</div>
</div>
</div>
<div id="jb-print-docs-body" class="onlyprint">
<h1>ExplainableBoostingClassifier</h1>
<!-- Table of contents -->
<div id="print-main-content">
<div id="jb-print-toc">
</div>
</div>
</div>
<div id="searchbox"></div>
<article class="bd-article">
<section class="tex2jax_ignore mathjax_ignore" id="explainableboostingclassifier">
<h1>ExplainableBoostingClassifier<a class="headerlink" href="#explainableboostingclassifier" title="Permalink to this heading">#</a></h1>
<p>Link to Algorithm description: <a class="reference internal" href="../../ebm.html"><span class="doc std std-doc">EBM</span></a></p>
<p>Greediness and smoothing in the EBM training algorithm were enabled by default in release v0.5.1 on Feb 8, 2024. Greediness and smoothing can improve accuracy but may change the learned feature function graphs compared to those learned using the earlier pure round-robin (cyclic boosting) algorithm without smoothing. To train EBMs similar to the defaults in v0.5.0 and earlier, set the greedy_ratio parameter to 0.</p>
<dl class="py class">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">interpret.glassbox.</span></span><span class="sig-name descname"><span class="pre">ExplainableBoostingClassifier</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">feature_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">feature_types</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_bins</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1024</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_interaction_bins</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">64</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interactions</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'3x'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">validation_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.15</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">outer_bags</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">14</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">inner_bags</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">learning_rate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.015</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">greedy_ratio</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cyclic_progress</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">smoothing_rounds</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">75</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interaction_smoothing_rounds</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">75</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_rounds</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">50000</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">early_stopping_rounds</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">100</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">early_stopping_tolerance</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-05</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">callback</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_samples_leaf</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">4</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_hessian</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0001</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">reg_alpha</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">reg_lambda</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_delta_step</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">gain_scale</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">5.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_cat_samples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cat_smooth</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">missing</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'separate'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_leaves</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">monotone_constraints</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">objective</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'log_loss'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">n_jobs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-</span> <span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">random_state</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">42</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier" title="Permalink to this definition">#</a></dt>
<dd><p>An Explainable Boosting Classifier.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>feature_names</strong> (<em>list of str</em><em>, </em><em>default=None</em>) – List of feature names.</p></li>
<li><p><strong>feature_types</strong> (<em>list of FeatureType</em><em>, </em><em>default=None</em>) – <p>List of feature types. FeatureType can be:</p>
<blockquote>
<div><ul>
<li><p><cite>’auto’</cite>: Auto-detect</p></li>
<li><p><cite>’quantile’</cite>: Continuous with equal density bins</p></li>
<li><p><cite>’rounded_quantile’</cite>: Continuous with quantile bins, but the cut values are rounded when possible</p></li>
<li><p><cite>’uniform’</cite>: Continuous with equal width bins</p></li>
<li><p><cite>’winsorized’</cite>: Continuous with equal width bins, but the leftmost and rightmost cut are chosen by quantiles</p></li>
<li><p><cite>’continuous’</cite>: Use the default binning for continuous features, which is ‘quantile’ currently</p></li>
<li><p><cite>[List of float]</cite>: Continuous with specified cut values. Eg: [5.5, 8.75]</p></li>
<li><p><cite>[List of str]</cite>: Ordinal categorical where the order has meaning. Eg: [“low”, “medium”, “high”]</p></li>
<li><p><cite>’nominal’</cite>: Categorical where the order has no meaning. Eg: country names</p></li>
</ul>
</div></blockquote>
</p></li>
<li><p><strong>max_bins</strong> (<em>int</em><em>, </em><em>default=1024</em>) – Max number of bins per feature for the main effects stage.</p></li>
<li><p><strong>max_interaction_bins</strong> (<em>int</em><em>, </em><em>default=64</em>) – Max number of bins per feature for interaction terms.</p></li>
<li><p><strong>interactions</strong> (<em>int</em><em>, </em><em>float</em><em>, </em><em>str</em><em>, or </em><em>list of tuples of feature indices</em><em>, </em><em>default="3x"</em>) – <p>Interaction terms to be included in the model. Options are:</p>
<blockquote>
<div><ul>
<li><p>Integer (1 <= interactions): Count of interactions to be automatically selected</p></li>
<li><p>Percentage (interactions < 1.0): Determine the integer count of interactions by multiplying the number of features by this percentage</p></li>
<li><p>String with format (float + “x”): Determine the integer count of interactions by multiplying the number of features by the float value.</p></li>
<li><p>List of tuples: The tuples contain the indices of the features within each additive term. In addition to pairs,
the interactions parameter accepts higher order interactions. It also accepts univariate terms which will cause
the algorithm to boost the main terms at the same time as the interactions. When boosting mains at the same time
as interactions, the exclude parameter should be set to ‘mains’ and currently max_bins needs to be equal to
max_interaction_bins.</p></li>
</ul>
</div></blockquote>
</p></li>
<li><p><strong>exclude</strong> (<em>'mains'</em><em> or </em><em>list of tuples of feature indices</em><em>|</em><em>names</em><em>, </em><em>default=None</em>) – Features or terms to be excluded.</p></li>
<li><p><strong>validation_size</strong> (<em>int</em><em> or </em><em>float</em><em>, </em><em>default=0.15</em>) – <p>Validation set size. Used for early stopping during boosting, and is needed to create outer bags.</p>
<blockquote>
<div><ul>
<li><p>Integer (1 <= validation_size): Count of samples to put in the validation sets</p></li>
<li><p>Percentage (validation_size < 1.0): Percentage of the data to put in the validation sets</p></li>
<li><p>0: Turns off early stopping. Outer bags have no utility. Error bounds will be eliminated</p></li>
</ul>
</div></blockquote>
</p></li>
<li><p><strong>outer_bags</strong> (<em>int</em><em>, </em><em>default=14</em>) – Number of outer bags. Outer bags are used to generate error bounds and help with smoothing the graphs.</p></li>
<li><p><strong>inner_bags</strong> (<em>int</em><em>, </em><em>default=0</em>) – Number of inner bags. 0 turns off inner bagging.</p></li>
<li><p><strong>learning_rate</strong> (<em>float</em><em>, </em><em>default=0.015</em>) – Learning rate for boosting.</p></li>
<li><p><strong>greedy_ratio</strong> (<em>float</em><em>, </em><em>default=10.0</em>) – The proportion of greedy boosting steps relative to cyclic boosting steps.
A value of 0 disables greedy boosting, effectively turning it off.</p></li>
<li><p><strong>cyclic_progress</strong> (<em>bool</em><em> or </em><em>float</em><em>, </em><em>default=False</em>) – This parameter specifies the proportion of the boosting cycles that will
actively contribute to improving the model’s performance. It is expressed
as a bool or float between 0 and 1, with the default set to True(1.0), meaning 100% of
the cycles are expected to make forward progress. If forward progress is
not achieved during a cycle, that cycle will not be wasted; instead,
it will be used to update internal gain calculations related to how effective
each feature is in predicting the target variable. Setting this parameter
to a value less than 1.0 can be useful for preventing overfitting.</p></li>
<li><p><strong>smoothing_rounds</strong> (<em>int</em><em>, </em><em>default=75</em>) – Number of initial highly regularized rounds to set the basic shape of the main effect feature graphs.</p></li>
<li><p><strong>interaction_smoothing_rounds</strong> (<em>int</em><em>, </em><em>default=75</em>) – Number of initial highly regularized rounds to set the basic shape of the interaction effect feature graphs during fitting.</p></li>
<li><p><strong>max_rounds</strong> (<em>int</em><em>, </em><em>default=50000</em>) – Total number of boosting rounds with n_terms boosting steps per round.</p></li>
<li><p><strong>early_stopping_rounds</strong> (<em>int</em><em>, </em><em>default=100</em>) – Number of rounds with no improvement to trigger early stopping. 0 turns off
early stopping and boosting will occur for exactly max_rounds.</p></li>
<li><p><strong>early_stopping_tolerance</strong> (<em>float</em><em>, </em><em>default=1e-5</em>) – Tolerance that dictates the smallest delta required to be considered an
improvement which prevents the algorithm from early stopping.
early_stopping_tolerance is expressed as a percentage of the early
stopping metric. Negative values indicate that the individual
models should be overfit before stopping.
EBMs are a bagged ensemble of models. Setting the early_stopping_tolerance
to zero (or even negative), allows learning to overfit each of the individual
models a little, which can improve the accuracy of the ensemble as a whole.
Overfitting each of the individual models reduces the bias of each model at
the expense of increasing the variance (due to overfitting) of the individual
models. But averaging the models in the ensemble reduces variance without
much change in bias. Since the goal is to find the optimum bias-variance
tradeoff for the ensemble of models — not the individual models — a small
amount of overfitting of the individual models can improve the accuracy of
the ensemble as a whole.</p></li>
<li><p><strong>callback</strong> (<em>Optional</em><em>[</em><em>Callable</em><em>[</em><em>[</em><em>int</em><em>, </em><em>int</em><em>, </em><em>bool</em><em>, </em><em>float</em><em>]</em><em>, </em><em>bool</em><em>]</em><em>]</em><em>, </em><em>default=None</em>) – A user-defined function that is invoked at the end of each boosting step to determine
whether to terminate boosting or continue. If it returns True, the boosting loop is
stopped immediately. By default, no callback is used and training proceeds according
to the early stopping settings. The callback function receives:
(1) the bag index, (2) the number of boosting steps completed,
(3) a boolean indicating whether progress was made in the current step, and (4) the current best score.</p></li>
<li><p><strong>min_samples_leaf</strong> (<em>int</em><em>, </em><em>default=4</em>) – Minimum number of samples allowed in the leaves.</p></li>
<li><p><strong>min_hessian</strong> (<em>float</em><em>, </em><em>default=1e-4</em>) – Minimum hessian required to consider a potential split valid.</p></li>
<li><p><strong>reg_alpha</strong> (<em>float</em><em>, </em><em>default=0.0</em>) – L1 regularization.</p></li>
<li><p><strong>reg_lambda</strong> (<em>float</em><em>, </em><em>default=0.0</em>) – L2 regularization.</p></li>
<li><p><strong>max_delta_step</strong> (<em>float</em><em>, </em><em>default=0.0</em>) – Used to limit the max output of tree leaves. <=0.0 means no constraint.</p></li>
<li><p><strong>gain_scale</strong> (<em>float</em><em>, </em><em>default=5.0</em>) – Scale factor to apply to nominal categoricals. A scale factor above 1.0 will cause the
algorithm focus more on the nominal categoricals.</p></li>
<li><p><strong>min_cat_samples</strong> (<em>int</em><em>, </em><em>default=10</em>) – Minimum number of samples in order to treat a category separately. If lower than this threshold
the category is combined with other categories that have low numbers of samples.</p></li>
<li><p><strong>cat_smooth</strong> (<em>float</em><em>, </em><em>default=10.0</em>) – Used for the categorical features. This can reduce the effect of noises in categorical features,
especially for categories with limited data.</p></li>
<li><p><strong>missing</strong> (<em>str</em><em>, </em><em>default="separate"</em>) – <p>Method for handling missing values during boosting. The placement of the missing value bin can influence
the resulting model graphs. For example, placing the bin on the “low” side may cause missing values to
affect lower bins, and vice versa. This parameter does not affect the final placement
of the missing bin in the model (the missing bin will remain at index 0 in the term_scores_ attribute).
Possible values for missing are:</p>
<blockquote>
<div><ul>
<li><p><cite>’low’</cite>: Place the missing bin on the left side of the graphs.</p></li>
<li><p><cite>’high’</cite>: Place the missing bin on the right side of the graphs.</p></li>
<li><p><cite>’separate’</cite>: Place the missing bin in its own leaf during each boosting step,
effectively making it location-agnostic. This can lead to overfitting, especially
when the proportion of missing values is small.</p></li>
<li><p><cite>’gain’</cite>: Choose the best leaf for the missing value contribution at each boosting step, based on gain.</p></li>
</ul>
</div></blockquote>
</p></li>
<li><p><strong>max_leaves</strong> (<em>int</em><em>, </em><em>default=2</em>) – Maximum number of leaves allowed in each tree.</p></li>
<li><p><strong>monotone_constraints</strong> (<em>list of int</em><em>, </em><em>default=None</em>) – <p>This parameter allows you to specify monotonic constraints for each feature’s
relationship with the target variable during model fitting. However, it is
generally recommended to apply monotonic constraints post-fit using the
<cite>monotonize</cite> function rather than setting them during the fitting process.
This recommendation is based on the observation that, during fitting,
the boosting algorithm may compensate for a monotone constraint on one
feature by utilizing another correlated feature, potentially obscuring
any monotonic violations.</p>
<p>If you choose to define monotone constraints, <cite>monotone_constraints</cite>
should be a list with a length equal to the number of features.
Each element in the list corresponds to a feature and should take
one of the following values:</p>
<blockquote>
<div><ul>
<li><p>0: No monotonic constraint is imposed on the corresponding feature’s partial response.</p></li>
<li><p>+1: The partial response of the corresponding feature should be monotonically increasing with respect to the target.</p></li>
<li><p>-1: The partial response of the corresponding feature should be monotonically decreasing with respect to the target.</p></li>
</ul>
</div></blockquote>
</p></li>
<li><p><strong>objective</strong> (<em>str</em><em>, </em><em>default="log_loss"</em>) – The objective to optimize.</p></li>
<li><p><strong>n_jobs</strong> (<em>int</em><em>, </em><em>default=-2</em>) – Number of jobs to run in parallel. Negative integers are interpreted as following joblib’s formula
(n_cpus + 1 + n_jobs), just like scikit-learn. Eg: -2 means using all threads except 1.</p></li>
<li><p><strong>random_state</strong> (<em>int</em><em> or </em><em>None</em><em>, </em><em>default=42</em>) – Random state. None uses device_random and generates non-repeatable sequences.</p></li>
</ul>
</dd>
<dt class="field-even">Variables<span class="colon">:</span></dt>
<dd class="field-even"><ul class="simple">
<li><p><strong>classes_</strong> (array of bool, int, or unicode with shape <code class="docutils literal notranslate"><span class="pre">(n_classes,)</span></code>) – The class labels.</p></li>
<li><p><strong>n_features_in_</strong> (<em>int</em>) – Number of features.</p></li>
<li><p><strong>feature_names_in_</strong> (<em>List of str</em>) – Resolved feature names. Names can come from feature_names, X, or be auto-generated.</p></li>
<li><p><strong>feature_types_in_</strong> (<em>List of str</em>) – Resolved feature types. Can be: ‘continuous’, ‘nominal’, or ‘ordinal’.</p></li>
<li><p><strong>bins_</strong> (List[Union[List[Dict[str, int]], List[array of float with shape <code class="docutils literal notranslate"><span class="pre">(n_cuts,)</span></code>]]]) – Per-feature list that defines how to bin each feature. Each feature in the list contains
a list of binning resolutions. The first item in the binning resolution list is for binning
main effect features. If there are more items in the binning resolution list, they define the
binning for successive levels of resolutions. The item at index 1, if it exists, defines the
binning for pairs. The last binning resolution defines the bins for all successive interaction levels.
If the binning resolution list contains dictionaries, then the feature is either a ‘nominal’ or
‘ordinal’ categorical. If the binning resolution list contains arrays, then the feature is ‘continuous’
and the arrays will contain float cut points that separate continuous values into bins.</p></li>
<li><p><strong>feature_bounds_</strong> (array of float with shape <code class="docutils literal notranslate"><span class="pre">(n_features,</span> <span class="pre">2)</span></code>) – min/max bounds for each feature. feature_bounds_[feature_index, 0] is the min value of the feature
and feature_bounds_[feature_index, 1] is the max value of the feature. Categoricals have min & max
values of NaN.</p></li>
<li><p><strong>histogram_edges_</strong> (List of None or array of float with shape <code class="docutils literal notranslate"><span class="pre">(n_hist_edges,)</span></code>) – Per-feature list of the histogram edges. Categorical features contain None within the List
at their feature index.</p></li>
<li><p><strong>histogram_weights_</strong> (List of array of float with shape <code class="docutils literal notranslate"><span class="pre">(n_hist_bins,)</span></code>) – Per-feature list of the total sample weights within each feature’s histogram bins.</p></li>
<li><p><strong>unique_val_counts_</strong> (array of int with shape <code class="docutils literal notranslate"><span class="pre">(n_features,)</span></code>) – Per-feature count of the number of unique feature values.</p></li>
<li><p><strong>term_features_</strong> (<em>List of tuples of feature indices</em>) – Additive terms used in the model and their component feature indices.</p></li>
<li><p><strong>term_names_</strong> (<em>List of str</em>) – List of term names.</p></li>
<li><p><strong>bin_weights_</strong> (List of array of float with shape <code class="docutils literal notranslate"><span class="pre">(n_feature0_bins,</span> <span class="pre">...,</span> <span class="pre">n_featureN_bins)</span></code>) – Per-term list of the total sample weights in each term’s tensor bins.</p></li>
<li><p><strong>bagged_scores_</strong> (List of array of float with shape <code class="docutils literal notranslate"><span class="pre">(n_outer_bags,</span> <span class="pre">n_feature0_bins,</span> <span class="pre">...,</span> <span class="pre">n_featureN_bins,</span> <span class="pre">n_classes)</span></code> or <code class="docutils literal notranslate"><span class="pre">(n_outer_bags,</span> <span class="pre">n_feature0_bins,</span> <span class="pre">...,</span> <span class="pre">n_featureN_bins)</span></code>) – Per-term list of the bagged model scores.
The last dimension of length n_classes is dropped for binary classification.</p></li>
<li><p><strong>term_scores_</strong> (List of array of float with shape <code class="docutils literal notranslate"><span class="pre">(n_feature0_bins,</span> <span class="pre">...,</span> <span class="pre">n_featureN_bins,</span> <span class="pre">n_classes)</span></code> or <code class="docutils literal notranslate"><span class="pre">(n_feature0_bins,</span> <span class="pre">...,</span> <span class="pre">n_featureN_bins)</span></code>) – Per-term list of the model scores.
The last dimension of length n_classes is dropped for binary classification.</p></li>
<li><p><strong>standard_deviations_</strong> (List of array of float with shape <code class="docutils literal notranslate"><span class="pre">(n_feature0_bins,</span> <span class="pre">...,</span> <span class="pre">n_featureN_bins,</span> <span class="pre">n_classes)</span></code> or <code class="docutils literal notranslate"><span class="pre">(n_feature0_bins,</span> <span class="pre">...,</span> <span class="pre">n_featureN_bins)</span></code>) – Per-term list of the standard deviations of the bagged model scores.
The last dimension of length n_classes is dropped for binary classification.</p></li>
<li><p><strong>link_</strong> (<em>str</em>) – Link function used to convert the predictions or targets into linear space
additive scores and vice versa via the inverse link. Possible values include:
“monoclassification”, “custom_binary”, “custom_ovr”, “custom_multinomial”,
“mlogit”, “vlogit”, “logit”, “probit”, “cloglog”, “loglog”, “cauchit”</p></li>
<li><p><strong>link_param_</strong> (<em>float</em>) – Float value that can be used by the link function. For classification it is only used by “custom_classification”.</p></li>
<li><p><strong>bag_weights_</strong> (array of float with shape <code class="docutils literal notranslate"><span class="pre">(n_outer_bags,)</span></code>) – Per-bag record of the total weight within each bag.</p></li>
<li><p><strong>best_iteration_</strong> (array of int with shape <code class="docutils literal notranslate"><span class="pre">(n_stages,</span> <span class="pre">n_outer_bags)</span></code>) – The number of boosting iterations performed within each stage until either early stopping, or the max_rounds was reached.
Normally, the count of main effects boosting iterations will be in best_iteration_[0],
and the count of interaction boosting iterations will be in best_iteration_[1].</p></li>
<li><p><strong>intercept_</strong> (array of float with shape <code class="docutils literal notranslate"><span class="pre">(n_classes,)</span></code> or <code class="docutils literal notranslate"><span class="pre">(1,)</span></code>) – Intercept of the model. Binary classification is shape <code class="docutils literal notranslate"><span class="pre">(1,)</span></code>, and multiclass is shape <code class="docutils literal notranslate"><span class="pre">(n_classes,)</span></code>.</p></li>
<li><p><strong>bagged_intercept_</strong> (array of float with shape <code class="docutils literal notranslate"><span class="pre">(n_outer_bags,</span> <span class="pre">n_classes)</span></code> or <code class="docutils literal notranslate"><span class="pre">(n_outer_bags,)</span></code>) – Bagged intercept of the model. Binary classification is shape <code class="docutils literal notranslate"><span class="pre">(n_outer_bags,)</span></code>, and multiclass is shape <code class="docutils literal notranslate"><span class="pre">(n_outer_bags,</span> <span class="pre">n_classes)</span></code>.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.copy">
<span class="sig-name descname"><span class="pre">copy</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.copy" title="Permalink to this definition">#</a></dt>
<dd><p>Make a deepcopy of the EBM.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>The new copy.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.decision_function">
<span class="sig-name descname"><span class="pre">decision_function</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">X</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">init_score</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.decision_function" title="Permalink to this definition">#</a></dt>
<dd><p>Predict scores from model before calling the link function.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>X</strong> – NumPy array for samples.</p></li>
<li><p><strong>init_score</strong> – Optional. Either a model that can generate scores or per-sample initialization score.
If samples scores it should be the same length as X.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The sum of the additive term contributions.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.estimate_mem">
<span class="sig-name descname"><span class="pre">estimate_mem</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">X</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data_multiplier</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.estimate_mem" title="Permalink to this definition">#</a></dt>
<dd><dl class="simple">
<dt>Estimate the amount of memory required during the call to the fit</dt><dd><p>function. This estimate does not include the code or data memory used
by the calling process, or the amount of code or non-EBM data memory
allocated by any child processes started by joblib. If these need to be
included, it is recommended to fit a toy EBM model first with n_jobs
and outer_bags set to the numbers that will be used in the final fit and
add that value to the estimate provided by this function.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>X</strong> (<em>array-like</em><em> or </em><em>sparse matrix</em>) – Shape (n_samples, n_features). Training data.</p></li>
<li><p><strong>y</strong> (<em>array-like</em><em>, </em><em>optional</em>) – Shape (n_samples,). Target values.</p></li>
<li><p><strong>data_multiplier</strong> (<em>float</em>) – Controls inclusion of X’s memory.
If set to 0.0, this function only estimates the additional
memory consumed by the fit function. If set to 1.0, it includes
the memory allocated to X by the caller. Set above 1.0 to account
for extra copies made before calling fit.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p><dl class="simple">
<dt>Estimated memory usage in bytes.</dt><dd><p>The estimate excludes the memory from the caller’s copy of X,
and the process’s code or other unrelated data. The estimate
is more accurate for larger datasets.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>int</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.eval_terms">
<span class="sig-name descname"><span class="pre">eval_terms</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">X</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.eval_terms" title="Permalink to this definition">#</a></dt>
<dd><p>Term scores identical to the local explanation values obtained by calling ebm.explain_local(x).</p>
<p>Calling interpret.utils.inv_link(ebm.eval_terms(X).sum(axis=1) + ebm.intercept_, ebm.link_)
is equivalent to calling ebm.predict(X) for regression or ebm.predict_proba(X) for classification.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>X</strong> – NumPy array for samples.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>local explanation scores for each term of each sample.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.explain_global">
<span class="sig-name descname"><span class="pre">explain_global</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.explain_global" title="Permalink to this definition">#</a></dt>
<dd><p>Provide global explanation for model.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>name</strong> – User-defined explanation name.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>An explanation object,
visualizing feature-value pairs as horizontal bar chart.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.explain_local">
<span class="sig-name descname"><span class="pre">explain_local</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">X</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">init_score</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.explain_local" title="Permalink to this definition">#</a></dt>
<dd><p>Provide local explanations for provided samples.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>X</strong> – NumPy array for X to explain.</p></li>
<li><p><strong>y</strong> – NumPy vector for y to explain.</p></li>
<li><p><strong>name</strong> – User-defined explanation name.</p></li>
<li><p><strong>init_score</strong> – Optional. Either a model that can generate scores or per-sample initialization score.
If samples scores it should be the same length as X.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>An explanation object, visualizing feature-value pairs
for each sample as horizontal bar charts.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.fit">
<span class="sig-name descname"><span class="pre">fit</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">X</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sample_weight</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bags</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">init_score</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.fit" title="Permalink to this definition">#</a></dt>
<dd><p>Fit model to provided samples.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>X</strong> – {array-like, sparse matrix} of shape (n_samples, n_features). Training data.</p></li>
<li><p><strong>y</strong> – array-like of shape (n_samples,). Target values.</p></li>
<li><p><strong>sample_weight</strong> – Optional array of weights per sample. Should be same length as X and y.</p></li>
<li><p><strong>bags</strong> – Optional bag definitions. The first dimension should have length equal to the number of samples.
The second dimension should have length equal to the number of outer_bags. The contents should be
+1 for training, -1 for validation, and 0 if not included in the bag. Numbers other than 1 indicate
how many times to include the sample in the training or validation sets.</p></li>
<li><p><strong>init_score</strong> – Optional. Either a model that can generate scores or per-sample initialization score.
If samples scores it should be the same length as X.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Itself.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.monotonize">
<span class="sig-name descname"><span class="pre">monotonize</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">term</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">increasing</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'auto'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">passthrough</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.monotonize" title="Permalink to this definition">#</a></dt>
<dd><p>Adjust a term to be monotone using isotonic regression.</p>
<p>An important consideration is that this function only adjusts a single term and will not modify pairwise terms.
When a feature needs to be globally monotonic, any pairwise terms that include the feature
should be excluded from the model.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>term</strong> – Index or name of the term to monotonize</p></li>
<li><p><strong>increasing</strong> – ‘auto’ or bool. ‘auto’ decides direction based on Spearman correlation estimate.</p></li>
<li><p><strong>passthrough</strong> – the process of monotonization can result in a change to the mean response
of the model. If passthrough is set to 0.0 then the model’s mean response to the
training set will not change. If passthrough is set to 1.0 then any change to the
mean response made by monotonization will be passed through to self.intercept_.
Values between 0 and 1 will result in that percentage being passed through.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Itself.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.predict">
<span class="sig-name descname"><span class="pre">predict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">X</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">init_score</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.predict" title="Permalink to this definition">#</a></dt>
<dd><p>Predict on provided samples.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>X</strong> – NumPy array for samples.</p></li>
<li><p><strong>init_score</strong> – Optional. Either a model that can generate scores or per-sample initialization score.
If samples scores it should be the same length as X.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Predicted class label per sample.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.predict_proba">
<span class="sig-name descname"><span class="pre">predict_proba</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">X</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">init_score</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.predict_proba" title="Permalink to this definition">#</a></dt>
<dd><p>Probability estimates on provided samples.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>X</strong> – NumPy array for samples.</p></li>
<li><p><strong>init_score</strong> – Optional. Either a model that can generate scores or per-sample initialization score.
If samples scores it should be the same length as X.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Probability estimate of sample for each class.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.predict_with_uncertainty">
<span class="sig-name descname"><span class="pre">predict_with_uncertainty</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">X</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">init_score</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.predict_with_uncertainty" title="Permalink to this definition">#</a></dt>
<dd><p>Gets raw scores and uncertainties from the bagged base models.
Generates predictions by averaging outputs across all bagged models, and estimates
uncertainty using the standard deviation of predictions across bags.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>X</strong> – ndarray of shape (n_samples, n_features)
The input samples to predict on.</p></li>
<li><p><strong>init_score</strong> – Optional. Either a model that can generate scores or per-sample initialization score.
If samples scores it should be the same length as X.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p><dl class="simple">
<dt>ndarray of shape (n_samples, 2)</dt><dd><p>First column contains mean predictions
Second column contains uncertainties</p>
</dd>
</dl>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.remove_features">
<span class="sig-name descname"><span class="pre">remove_features</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">features</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.remove_features" title="Permalink to this definition">#</a></dt>
<dd><p>Remove features (and their associated components) from a fitted EBM.</p>
<p>Note that this will change the structure (i.e., by removing the specified
indices) of the following components of <code class="docutils literal notranslate"><span class="pre">self</span></code>: <code class="docutils literal notranslate"><span class="pre">histogram_edges_</span></code>,
<code class="docutils literal notranslate"><span class="pre">histogram_weights_</span></code>, <code class="docutils literal notranslate"><span class="pre">unique_val_counts_</span></code>, <code class="docutils literal notranslate"><span class="pre">bins_</span></code>,
<code class="docutils literal notranslate"><span class="pre">feature_names_in_</span></code>, <code class="docutils literal notranslate"><span class="pre">feature_types_in_</span></code>, and <code class="docutils literal notranslate"><span class="pre">feature_bounds_</span></code>.
Also, any terms that use the features being deleted will be deleted.
The following attributes that the caller passed to the __init__ function are
not modified: <code class="docutils literal notranslate"><span class="pre">feature_names</span></code>, and <code class="docutils literal notranslate"><span class="pre">feature_types</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>features</strong> – A list or enumerable of feature names or indices or
booleans indicating which features to remove.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Itself.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.remove_terms">
<span class="sig-name descname"><span class="pre">remove_terms</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">terms</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.remove_terms" title="Permalink to this definition">#</a></dt>
<dd><p>Remove terms (and their associated components) from a fitted EBM.</p>
<p>Note that this will change the structure (i.e., by removing the specified
indices) of the following components of <code class="docutils literal notranslate"><span class="pre">self</span></code>: <code class="docutils literal notranslate"><span class="pre">term_features_</span></code>,
<code class="docutils literal notranslate"><span class="pre">term_names_</span></code>, <code class="docutils literal notranslate"><span class="pre">term_scores_</span></code>, <code class="docutils literal notranslate"><span class="pre">bagged_scores_</span></code>,
<code class="docutils literal notranslate"><span class="pre">standard_deviations_</span></code>, and <code class="docutils literal notranslate"><span class="pre">bin_weights_</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>terms</strong> – A list (or other enumerable object) of term names or indices or booleans.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Itself.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.reorder_classes">
<span class="sig-name descname"><span class="pre">reorder_classes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">classes</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.reorder_classes" title="Permalink to this definition">#</a></dt>
<dd><p>Re-order the class positions in a classification EBM.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>classes</strong> – The new class order</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Itself.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.scale">
<span class="sig-name descname"><span class="pre">scale</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">term</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">factor</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.scale" title="Permalink to this definition">#</a></dt>
<dd><p>Scale the individual term contribution by a constant factor.</p>
<p>For example, you can nullify the contribution of specific terms by setting
their corresponding weights to zero; this would cause the associated
global explanations (e.g., variable importance) to also be zero. A
couple of things are worth noting: 1) this method has no affect on the
fitted intercept and users will have to change that attribute directly
(if desired), and 2) reweighting specific term contributions will also
reweight their related components in a similar manner (e.g., variable
importance scores, standard deviations, etc.).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>term</strong> – term index or name of the term to be scaled.</p></li>
<li><p><strong>factor</strong> – The amount to scale the term by.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Itself.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.score">
<span class="sig-name descname"><span class="pre">score</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">X</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sample_weight</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.score" title="Permalink to this definition">#</a></dt>
<dd><p>Return <span class="xref std std-ref">accuracy</span> on provided data and labels.</p>
<p>In multi-label classification, this is the subset accuracy
which is a harsh metric since you require for each sample that
each label set be correctly predicted.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>X</strong> (<em>array-like of shape</em><em> (</em><em>n_samples</em><em>, </em><em>n_features</em><em>)</em>) – Test samples.</p></li>
<li><p><strong>y</strong> (<em>array-like of shape</em><em> (</em><em>n_samples</em><em>,</em><em>) or </em><em>(</em><em>n_samples</em><em>, </em><em>n_outputs</em><em>)</em>) – True labels for <cite>X</cite>.</p></li>
<li><p><strong>sample_weight</strong> (<em>array-like of shape</em><em> (</em><em>n_samples</em><em>,</em><em>)</em><em>, </em><em>default=None</em>) – Sample weights.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>score</strong> – Mean accuracy of <code class="docutils literal notranslate"><span class="pre">self.predict(X)</span></code> w.r.t. <cite>y</cite>.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.sweep">
<span class="sig-name descname"><span class="pre">sweep</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">terms</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bins</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">features</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.sweep" title="Permalink to this definition">#</a></dt>
<dd><p>Purge unused elements from a fitted EBM.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>terms</strong> – Boolean indicating if zeroed terms that do not affect the output
should be purged from the model.</p></li>
<li><p><strong>bins</strong> – Boolean indicating if unused bin levels that do not affect the output
should be purged from the model.</p></li>
<li><p><strong>features</strong> – Boolean indicating if features that are not used in any terms
and therefore do not affect the output should be purged from the model.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Itself.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.term_importances">
<span class="sig-name descname"><span class="pre">term_importances</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">importance_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'avg_weight'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.term_importances" title="Permalink to this definition">#</a></dt>
<dd><p>Provide the term importances.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>importance_type</strong> – the type of term importance requested (‘avg_weight’, ‘min_max’)</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>An array term importances with one importance per additive term</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="interpret.glassbox.ExplainableBoostingClassifier.to_excel">
<span class="sig-name descname"><span class="pre">to_excel</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#interpret.glassbox.ExplainableBoostingClassifier.to_excel" title="Permalink to this definition">#</a></dt>