mirror of
https://github.com/Doctorado-ML/beflask.git
synced 2025-08-16 15:45:51 +00:00
solve report and compare
This commit is contained in:
110
app/results/templates/_table_report.html
Normal file
110
app/results/templates/_table_report.html
Normal file
@@ -0,0 +1,110 @@
|
||||
<div id="app">
|
||||
<section class="section">
|
||||
<div class="container-fluid">
|
||||
<div>
|
||||
<table class="table table-bordered bg-light">
|
||||
<thead>
|
||||
<tr class="bg-info text-white">
|
||||
<th class="text-center">Platform</th>
|
||||
<th class="text-center">Model</th>
|
||||
<th class="text-center">Date</th>
|
||||
<th class="text-center">Time</th>
|
||||
{% if data.duration > 7200 %}
|
||||
{% set unit = "h" %}
|
||||
{% set divider = 3600 %}
|
||||
{% else %}
|
||||
{% set unit = "min" %}
|
||||
{% set divider = 60 %}
|
||||
{% endif %}
|
||||
<th class="text-center">Duration ({{ unit }})</th>
|
||||
<th class="text-center">Stratified</th>
|
||||
<th class="text-center">Discretized</th>
|
||||
<th class="text-center"># Folds</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-center">{{ data.platform }}</th>
|
||||
<th class="text-center">{{ data.model }} {{ data.version }}</th>
|
||||
<th class="text-center">{{ data.date }}</th>
|
||||
<th class="text-center">{{ data.time }}</th>
|
||||
<th class="text-center">{{ "%.2f" % (data.duration/divider) }}</th>
|
||||
<th class="text-center">{{ data.stratified }}</th>
|
||||
<th class="text-center">{{ data.discretized }}</th>
|
||||
<th class="text-center">{{ data.folds }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-center bg-info text-white">Language</th>
|
||||
<th class="text-center" colspan=3>{{ data.language }} {{ data.language_version }}</th>
|
||||
<th class="text-center bg-info text-white">Seeds</th>
|
||||
<th class="text-center" colspan=6>{{ data.seeds }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div>
|
||||
<button class="{{ button }}" onclick="excelFile()">
|
||||
<i class="mdi mdi-file-excel"></i> Excel
|
||||
</button>
|
||||
</div>
|
||||
<table id="report-table"
|
||||
class="table table-striped table-hover table-bordered bg-light">
|
||||
<thead>
|
||||
<tr class="bg-primary text-white">
|
||||
<th class="text-center">Dataset</th>
|
||||
<th class="text-center">Samples</th>
|
||||
<th class="text-center">Features</th>
|
||||
<th class="text-center">Classes</th>
|
||||
<th class="text-center">Nodes</th>
|
||||
<th class="text-center">{{ data.score_name|capitalize }}</th>
|
||||
<th class="text-center">Time</th>
|
||||
<th class="text-center">hyperparameters</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in data.results %}
|
||||
<tr>
|
||||
<td>{{ item.dataset }}</td>
|
||||
<td class="{{ right }}">{{ '{:,}'.format(item.samples) }}</td>
|
||||
<td class="{{ right }}">{{"%d" % item.features}}</td>
|
||||
<td class="{{ right }}">{{"%d" % item.classes}}</td>
|
||||
<td class="{{ right }}">{{ '{:,.2f}'.format(item.nodes) }}</td>
|
||||
<td class="{{ right }}">{{"%.6f±%.4f" % (item.score, item.score_std)}} {{ item.symbol|safe }}</td>
|
||||
<td class="{{ right }}">{{"%.6f±%.4f" % (item.time, item.time_std)}}</td>
|
||||
<td class="{{ center }}">{{ item.hyperparameters }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% if summary|length > 0 %}
|
||||
<div class="col-4 col-lg-4">
|
||||
<table class="table table-bordered bg-light">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center bg-primary text-white">Symbol</th>
|
||||
<th class="text-center bg-primary text-white">Meaning</th>
|
||||
<th class="text-center bg-primary text-white">Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key, value in summary.items() %}
|
||||
<tr>
|
||||
<td class="{{ center }}">{{ key }}</td>
|
||||
<td>{{ value[0] }}</td>
|
||||
<td class={{ right }}>
|
||||
{{ '{:,}'.format(value[1]) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
<h7>
|
||||
<b>
|
||||
Total score: {{ "%.6f" % (data.results | sum(attribute="score") ) }}
|
||||
</b>
|
||||
</h7>
|
||||
<h7>
|
||||
Number of files: {{ data.results | length }}
|
||||
</h7>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
Reference in New Issue
Block a user