|
1 | 1 | {% if labels|length > 1 %} |
2 | | - {% with menuId='dropdownMenuLabel', menuText='Response', values=labels, menuDivVisible='explain-all' %} |
3 | | - {% include "dropdown.html" %} |
4 | | - {% endwith %} |
| 2 | +{% with menuId='dropdownMenuLabel', menuText='Response', values=labels, menuDivVisible='explain-all' %} |
| 3 | +{% include "dropdown.html" %} |
| 4 | +{% endwith %} |
5 | 5 | {% else %} |
6 | 6 | {% endif %} |
7 | 7 | <h3 data-toc-skip>Global feature importance plot</h3> |
8 | 8 | {% for label in labels %} |
9 | | - <div class="row" id="explain-all-div-{{ label['name'] }}" style="{% if label['index'] != 0 %}display:none;{% endif %} margin-right:5px; margin-left:5px; margin-top:5px;"> |
10 | | - {{ label['feature_importance_plot'] }} |
11 | | - </div> |
| 9 | +<div class="row" id="explain-all-div-{{ label['name'] }}" |
| 10 | + style="{% if label['index'] != 0 %}display:none;{% endif %} margin-right:5px; margin-left:5px; margin-top:5px;"> |
| 11 | + {{ label['feature_importance_plot'] }} |
| 12 | +</div> |
12 | 13 | {% endfor %} |
13 | 14 | <h3>Features contribution plots</h3> |
14 | 15 | {% for label in labels %} |
15 | | - <div class="row" id="explain-all-div-{{ label['name'] }}-2" style="{% if label['index'] != 0 %}display:none;{% endif %} margin-right:5px; margin-left:5px; margin-top:5px;"> |
16 | | - {% with menuId='dropdownMenu2', menuText='Feature', values=label['features'], menuDivVisible='explain-contrib-'~label['index'] %} |
17 | | - {% include "dropdown.html" %} |
18 | | - {% endwith %} |
19 | | - {% for col in label['features'] %} |
20 | | - <div class="row" id="explain-contrib-{{ label['index'] }}-div-{{ col['name'] }}" style="{% if col['feature_index'] != 0 %}display:none;{% endif %} margin-right:5px; margin-left:5px;"> |
21 | | - <h4>{{ col['name'] }} - {{ col['type'] }}</h4> |
22 | | - {% if col['name'] != col['description'] %} |
23 | | - <blockquote class="panel-content">{{ col['description'] }}</blockquote> |
24 | | - {% else %} |
25 | | - {% endif %} |
26 | | - {{ col['plot'] }} |
27 | | - </div> |
28 | | - {% endfor %} |
| 16 | +<div class="row" id="explain-all-div-{{ label['name'] }}-2" |
| 17 | + style="{% if label['index'] != 0 %}display:none;{% endif %} margin-right:5px; margin-left:5px; margin-top:5px;"> |
| 18 | + {% with menuId='dropdownMenu2', menuText='Feature', values=label['features'], |
| 19 | + menuDivVisible='explain-contrib-'~label['index'] %} |
| 20 | + {% include "dropdown.html" %} |
| 21 | + {% endwith %} |
| 22 | + {% for col in label['features'] %} |
| 23 | + <div class="row" id="explain-contrib-{{ label['index'] }}-div-{{ col['name'] }}" |
| 24 | + style="{% if col['feature_index'] != 0 %}display:none;{% endif %} margin-right:5px; margin-left:5px;"> |
| 25 | + <h4>{{ col['name'] }} - {{ col['type'] }}</h4> |
| 26 | + {% if col['name'] != col['description'] %} |
| 27 | + <blockquote class="panel-content">{{ col['description'] }}</blockquote> |
| 28 | + {% else %} |
| 29 | + {% endif %} |
| 30 | + {{ col['plot'] }} |
29 | 31 | </div> |
| 32 | + {% endfor %} |
| 33 | +</div> |
30 | 34 | {% endfor %} |
| 35 | +{% set has_interaction = false %} |
| 36 | +{% for label in labels %} |
| 37 | +{% if label['features_interaction']|length > 0 %} |
| 38 | +{% set has_interaction = true %} |
| 39 | +{% endif %} |
| 40 | +{% endfor %} |
| 41 | + |
| 42 | +{% if has_interaction %} |
31 | 43 | <h3>Features Top Interaction plots</h3> |
32 | 44 | {% for label in labels %} |
33 | | - <div class="row" id="explain-all-div-interaction-{{ label['name'] }}-2" style="{% if label['index'] != 0 %}display:none;{% endif %} margin-right:5px; margin-left:5px; margin-top:5px;"> |
34 | | - {% with menuId='dropdownMenu3', menuText='Interactions', values=label['features_interaction'], menuDivVisible='explain-contrib-interaction-'~label['index'] %} |
35 | | - {% include "dropdown.html" %} |
36 | | - {% endwith %} |
37 | | - {% for col in label['features_interaction'] %} |
38 | | - <div class="row" id="explain-contrib-interaction-{{ label['index'] }}-div-{{ col['name'] }}" style="{% if col['feature_index'] != 0 %}display:none;{% endif %} margin-right:5px; margin-left:5px;"> |
39 | | - <h4>{{ col['name'] }} - {{ col['type'] }}</h4> |
40 | | - {% if col['name'] != col['description'] %} |
41 | | - <blockquote class="panel-content">{{ col['description'] }}</blockquote> |
42 | | - {% else %} |
43 | | - {% endif %} |
44 | | - {{ col['plot'] }} |
45 | | - </div> |
46 | | - {% endfor %} |
| 45 | +{% if label['features_interaction']|length > 0 %} |
| 46 | +<div class="row" id="explain-all-div-interaction-{{ label['name'] }}-2" |
| 47 | + style="{% if label['index'] != 0 %}display:none;{% endif %} margin-right:5px; margin-left:5px; margin-top:5px;"> |
| 48 | + {% with menuId='dropdownMenu3', menuText='Interactions', values=label['features_interaction'], |
| 49 | + menuDivVisible='explain-contrib-interaction-'~label['index'] %} |
| 50 | + {% include "dropdown.html" %} |
| 51 | + {% endwith %} |
| 52 | + {% for col in label['features_interaction'] %} |
| 53 | + <div class="row" id="explain-contrib-interaction-{{ label['index'] }}-div-{{ col['name'] }}" |
| 54 | + style="{% if col['feature_index'] != 0 %}display:none;{% endif %} margin-right:5px; margin-left:5px;"> |
| 55 | + <h4>{{ col['name'] }} - {{ col['type'] }}</h4> |
| 56 | + {% if col['name'] != col['description'] %} |
| 57 | + <blockquote class="panel-content">{{ col['description'] }}</blockquote> |
| 58 | + {% endif %} |
| 59 | + {{ col['plot'] }} |
47 | 60 | </div> |
| 61 | + {% endfor %} |
| 62 | +</div> |
| 63 | +{% endif %} |
48 | 64 | {% endfor %} |
| 65 | +{% endif %} |
0 commit comments