我想打印所有功能的功能重要性,但是我只继续介绍前几个功能。

我尝试过的功能:

print(eli5.format_as_text(eli5.explain_weights(perm)))




print(eli5.format_as_html(eli5.explain_weights(perm)))


以及格式功能的显示选项show=("WEIGHTS", "ALL"),但它们都只打印前几个答案,然后用省略号省略其余内容,如下所示:

0.0955 ± 0.1404  x23
0.0490 ± 0.0661  x33
0.0401 ± 0.0253  x64
0.0324 ± 0.0245  x37
0.0263 ± 0.0480  x111
0.0253 ± 0.0057  x107
0.0248 ± 0.0237  x36
0.0245 ± 0.0265  x81
0.0209 ± 0.0173  x46
0.0139 ± 0.0129  x80
0.0126 ± 0.0121  x14
0.0125 ± 0.0182  x1
0.0122 ± 0.0110  x110
0.0113 ± 0.0135  x51
0.0113 ± 0.0198  x116
0.0106 ± 0.0063  x11
0.0104 ± 0.0153  x66
0.0088 ± 0.0278  x113
0.0086 ± 0.0236  x67
0.0085 ± 0.0194  x21
    … 101 more …


有什么办法可以打印所有内容?

最佳答案

top=100一样将属性explain_weights传递给eli5.explain_weights(perm, top=100)

https://eli5.readthedocs.io/en/latest/autodocs/eli5.html?highlight=top

看起来默认值为20:https://eli5.readthedocs.io/en/latest/_modules/eli5/sklearn/explain_weights.html?highlight=_TOP

_TOP=20

10-04 21:01