diff --git a/app/app.db b/app/app.db index cacd22d..39f99b2 100644 Binary files a/app/app.db and b/app/app.db differ diff --git a/app/results/main_select.py b/app/results/main_select.py index 045eb42..05b9d6a 100644 --- a/app/results/main_select.py +++ b/app/results/main_select.py @@ -106,6 +106,7 @@ def report(file_name): os.chdir(current_user.benchmark.folder) back = request.args.get("url") or "" back_name = request.args.get("url_name") or "" + app_config = dotenv_values(".env") with open(os.path.join(Folders.results, file_name)) as f: data = json.load(f) try: @@ -121,6 +122,7 @@ def report(file_name): summary=summary, back=back, back_name=back_name, + app_config=app_config, ) diff --git a/app/results/templates/_table_dataset.html b/app/results/templates/_table_dataset.html new file mode 100644 index 0000000..f291047 --- /dev/null +++ b/app/results/templates/_table_dataset.html @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + {% for file_name, item in results.items() %} + {% set parts = file_name.split('_') %} + {% set stratified = parts[6].split('.')[0] %} + + + + + + + + + + + + + + + + + {% endfor %} + +
ModelMetricPlatformStratifiedSamplesFeaturesClasses{{ app_config.nodes }}{{ app_config.leaves }}{{ app_config.depth }}ScoreTimeHyperparameters
{{ parts[2] }}{{ parts[1] }}{{ parts[3] }}{{ 'True' if stratified =='1' else 'False' }}{{ '{:,}'.format(item.samples) }}{{"%d" % item.features }}{{"%d" % item.classes }}{{ '{:,.2f}'.format(item.nodes) }}{{ '{:,}'.format(item.leaves) }}{{ '{:,}'.format(item.depth) }}{{"%.6f±%.4f" % (item.score, item.score_std)}}{{"%.6f±%.4f" % (item.time, item.time_std)}}{{ item.hyperparameters }} + +
diff --git a/app/results/templates/_table_datasets.html b/app/results/templates/_table_datasets.html index 88fa91c..c6cae94 100644 --- a/app/results/templates/_table_datasets.html +++ b/app/results/templates/_table_datasets.html @@ -1,5 +1,9 @@ + class="table table-striped table-hover table-bordered bg-light" + data-toggle="table" + data-sticky-header="true" + data-sticky-header-offset-y="50" + data-sortable="true"> diff --git a/app/results/templates/_table_report.html b/app/results/templates/_table_report.html index 6bd2d7c..c3101a3 100644 --- a/app/results/templates/_table_report.html +++ b/app/results/templates/_table_report.html @@ -52,7 +52,7 @@
Dataset
{{ excel_button([ file ]) }}
Nodes + data-sorter="remove_dot">{{ app_config.nodes }} + + - {% for item in data.results %} @@ -110,6 +106,8 @@ + + diff --git a/app/results/templates/dataset.html b/app/results/templates/dataset.html index 3421279..019a917 100644 --- a/app/results/templates/dataset.html +++ b/app/results/templates/dataset.html @@ -3,44 +3,9 @@ -
{{ app_config.leaves }}{{ app_config.depth }} Hyperparameters
{{"%d" % item.features}} {{"%d" % item.classes}} {{ '{:,.2f}'.format(item.nodes) }}{{ '{:,}'.format(item.leaves) }}{{ '{:,}'.format(item.depth) }} {{"%.6f±%.4f" % (item.score, item.score_std)}} {{ item.symbol|safe }} {{"%.6f±%.4f" % (item.time, item.time_std)}}
- - - - - - - - - - - - - - - - {% for file_name, item in results.items() %} - - - - - - - - - - - - - {% endfor %} - -
File NameSamplesFeaturesClasses{{ app_config.nodes }}{{ app_config.leaves }}{{ app_config.depth }}ScoreTimeHyperparameters
- {% set url = url_for(request.endpoint, **request.view_args)|urlencode %} - {{ file_name }} - {{ '{:,}'.format(item.samples) }}{{"%d" % item.features}}{{"%d" % item.classes}}{{ '{:,.2f}'.format(item.nodes) }}{{ '{:,}'.format(item.leaves) }}{{ '{:,}'.format(item.depth) }}{{"%.6f±%.4f" % (item.score, item.score_std)}}{{"%.6f±%.4f" % (item.time, item.time_std)}}{{ item.hyperparameters }}
+ {% include "_table_dataset.html" %} +{% endblock %} +{% block jscript %} + {{ super() }} + {% endblock %} diff --git a/app/results/templates/datasets.html b/app/results/templates/datasets.html index 1b9f7f6..374f32e 100644 --- a/app/results/templates/datasets.html +++ b/app/results/templates/datasets.html @@ -1,5 +1,5 @@ {% from "macros.html" import excel_button %} -{% extends "base.html" %} +{% extends "report_tables.html" %} {% block content %} {{ excel_button(["datasets"]) }} {% include "_table_datasets.html" %} diff --git a/app/static/css/main.css b/app/static/css/main.css index ee66c3c..7051d5f 100644 --- a/app/static/css/main.css +++ b/app/static/css/main.css @@ -44,5 +44,8 @@ body { padding-left: 0.5rem; } +.nav-benchmark{ + color:yellow; +} diff --git a/app/static/js/report.js b/app/static/js/report.js index c47584d..7af4b09 100644 --- a/app/static/js/report.js +++ b/app/static/js/report.js @@ -14,4 +14,14 @@ $(document).ready(function () { $(document).ajaxStop(function(){ $("body").removeClass('ajaxLoading'); }); -}); \ No newline at end of file +}); +function remove_plus(a, b) { + var aa = a.split('±')[0] + var bb = b.split('±')[0] + return aa - bb +} +function remove_dot(a, b) { + var aa = a.replace(',', '').replace('.', '') + var bb = b.replace(',', '').replace('.', '') + return aa - bb +} \ No newline at end of file diff --git a/app/templates/_nav.html b/app/templates/_nav.html index 4fbd5e2..b86461b 100644 --- a/app/templates/_nav.html +++ b/app/templates/_nav.html @@ -14,7 +14,10 @@