Bin*_*ing 3 python machine-learning keras
我想打印所有功能的功能重要性,但我一直只得到前几个。
\n\n我尝试过的功能:
\n\nprint(eli5.format_as_text(eli5.explain_weights(perm)))\nRun Code Online (Sandbox Code Playgroud)\n\n和
\n\nprint(eli5.format_as_html(eli5.explain_weights(perm)))\nRun Code Online (Sandbox Code Playgroud)\n\n还有格式函数上的显示选项,show=("WEIGHTS", "ALL")但它们都只打印前几个答案,然后用省略号省略其余部分,如下所示:
0.0955 \xc2\xb1 0.1404 x23\n0.0490 \xc2\xb1 0.0661 x33\n0.0401 \xc2\xb1 0.0253 x64\n0.0324 \xc2\xb1 0.0245 x37\n0.0263 \xc2\xb1 0.0480 x111\n0.0253 \xc2\xb1 0.0057 x107\n0.0248 \xc2\xb1 0.0237 x36\n0.0245 \xc2\xb1 0.0265 x81\n0.0209 \xc2\xb1 0.0173 x46\n0.0139 \xc2\xb1 0.0129 x80\n0.0126 \xc2\xb1 0.0121 x14\n0.0125 \xc2\xb1 0.0182 x1\n0.0122 \xc2\xb1 0.0110 x110\n0.0113 \xc2\xb1 0.0135 x51\n0.0113 \xc2\xb1 0.0198 x116\n0.0106 \xc2\xb1 0.0063 x11\n0.0104 \xc2\xb1 0.0153 x66\n0.0088 \xc2\xb1 0.0278 x113\n0.0086 \xc2\xb1 0.0236 x67\n0.0085 \xc2\xb1 0.0194 x21\n \xe2\x80\xa6 101 more \xe2\x80\xa6 \nRun Code Online (Sandbox Code Playgroud)\n\n有没有办法打印所有内容?
\n将属性传递top=100给explain_weightslikeeli5.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