-
Notifications
You must be signed in to change notification settings - Fork 333
/
feature_importances.html
32 lines (32 loc) · 1.33 KB
/
feature_importances.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
<table class="eli5-weights eli5-feature-importances" style="{{ target_table_styles }}">
<thead>
<tr style="{{ tr_styles }}">
<th style="{{ td1_styles }}">Weight</th>
<th style="{{ td2_styles }}">Feature</th>
</tr>
</thead>
<tbody>
{% for fw in expl.feature_importances.importances %}
<tr style="background-color: {{ fw.weight|weight_color(feat_imp_weight_range) }}; {{ tr_styles }}">
<td style="{{ td1_styles }}">
{% if fw.weight or fw.std %}{{ "%0.4f"|format(fw.weight) }}{% else %}0{% endif %}
{% if not fw.std is none %}
± {{ "%0.4f"|format(2 * fw.std) }}
{% endif %}
</td>
<td style="{{ td2_styles }}">
{{ fw.feature|format_feature(fw.weight, hl_spaces) }}
</td>
</tr>
{% endfor %}
{% if expl.feature_importances.remaining %}
{% with fw = expl.feature_importances.importances|last %}
<tr style="background-color: {{ fw.weight|weight_color(feat_imp_weight_range) }}; {{ tr_styles }}">
<td colspan="2" style="{{ tdm_styles }}">
<i>… {{ expl.feature_importances.remaining }} more …</i>
</td>
</tr>
{% endwith %}
{% endif %}
</tbody>
</table>