Commit c5c94ab4 authored by LIGNEUL CLEMENT's avatar LIGNEUL CLEMENT
Browse files

add batch average in see results

parent 0b83cf39
= EASEA Compiler App Documentation
Clément Ligneul <clement.ligneul@etu.unistra.fr>
v1.2 2021-07-24
v1.3 2021-07-27
:toc: left
:toclevels: 4
:hide-uri-scheme:
......@@ -264,7 +264,7 @@ image::images/island_menu.png[island menu image, 300, align=center]
==== See Results
When all the runs are finished, a new button appears. It allows you to see the results of the different runs. This function is available only non <<Multi-objective problems, multi-objective problems>>.
When all the runs are finished, a new button appears. It allows you to see the results of the different runs. This function is available only for non <<Multi-objective problems, multi-objective problems>>.
image::images/end_run_batch.png[end run in batch image, 800, align=center]
......@@ -373,4 +373,12 @@ If you use one of these options do not run in batch because the results will be
- If the run takes a long time, set "Time limit" option to 0 to have complete execution
- You can go to the EASEA website with the help menu. You can find a lot of useful information in this site like description of the compilation parameters
- The usual shortcuts are available here like ctrl+tab to switch of tab, tab and shift+tab to change focus etc...
- If you launch the executable from a terminal you can see more debug information
\ No newline at end of file
- If you launch the executable from a terminal you can see more debug information
== License
This application is under the "Creative Commons
Attribution - Non Commercial 4.0 Internional" license
To get a copy of this license, please consult:
https://creativecommons.org/licenses/by-nc/4.0/[window=_blank]
\ No newline at end of file
......@@ -445,7 +445,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<div class="details">
<span id="author" class="author">Clément Ligneul</span><br>
<span id="email" class="email"><a href="mailto:clement.ligneul@etu.unistra.fr">clement.ligneul@etu.unistra.fr</a></span><br>
<span id="revnumber">version 1.2 2021-07-24</span>
<span id="revnumber">version 1.3 2021-07-27</span>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
......@@ -506,6 +506,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</li>
<li><a href="#_multi_objective_problems">Multi-objective problems</a></li>
<li><a href="#_tips">Tips</a></li>
<li><a href="#_license">License</a></li>
</ul>
</div>
</div>
......@@ -989,7 +990,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<div class="sect3">
<h4 id="_see_results">See Results</h4>
<div class="paragraph">
<p>When all the runs are finished, a new button appears. It allows you to see the results of the different runs. This function is available only non <a href="#_multi_objective_problems">multi-objective problems</a>.</p>
<p>When all the runs are finished, a new button appears. It allows you to see the results of the different runs. This function is available only for non <a href="#_multi_objective_problems">multi-objective problems</a>.</p>
</div>
<div class="imageblock text-center">
<div class="content">
......@@ -1213,11 +1214,24 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
</div>
<div class="sect1">
<h2 id="_license">License</h2>
<div class="sectionbody">
<div class="paragraph">
<p>This application is under the "Creative Commons
Attribution - Non Commercial 4.0 Internional" license</p>
</div>
<div class="paragraph">
<p>To get a copy of this license, please consult:
<a href="https://creativecommons.org/licenses/by-nc/4.0/" class="bare" target="_blank" rel="noopener">creativecommons.org/licenses/by-nc/4.0/</a></p>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
Version 1.2 2021-07-24<br>
Last updated 2021-07-24 10:33:15 +0200
Version 1.3 2021-07-27<br>
Last updated 2021-07-27 13:22:59 +0200
</div>
</div>
</body>
......
= EASEA Compiler App Documentation
Clément Ligneul <clement.ligneul@etu.unistra.fr>
v1.2 2021-07-24
v1.3 2021-07-27
:toc: left
:toc-title: Table des matières
:toclevels: 4
......@@ -366,3 +366,13 @@ Si vous utilisez l'une de ces options ne faites pas d'exécution en batch car le
- Les raccourcis courants fonctionnent dans l'application (ctrl+tab pour changer d'onglet, tab et shift+tab pour changer le focus etc...)
- Si vous lancez l'exécutable de l'application depuis un terminal vous pouvez voir des informations utiles en cas de problèmes
== Licence
Cette application est placée sous licence "Creative Commons
Attribution - Pas d’Utilisation Commerciale 4.0 - International"
Pour accéder à une copie de cette licence, merci de vous rendre à
l'adresse suivante :
https://creativecommons.org/licenses/by-nc/4.0/deed.fr[window=_blank]
\ No newline at end of file
......@@ -445,7 +445,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<div class="details">
<span id="author" class="author">Clément Ligneul</span><br>
<span id="email" class="email"><a href="mailto:clement.ligneul@etu.unistra.fr">clement.ligneul@etu.unistra.fr</a></span><br>
<span id="revnumber">version 1.2 2021-07-24</span>
<span id="revnumber">version 1.3 2021-07-27</span>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table des matières</div>
......@@ -501,6 +501,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</li>
<li><a href="#_problèmes_multi_objectifs">Problèmes multi-objectifs</a></li>
<li><a href="#_conseils">Conseils</a></li>
<li><a href="#_licence">Licence</a></li>
</ul>
</div>
</div>
......@@ -1191,11 +1192,25 @@ Par exemple, la première graine vaut 0 et nous avons un batch de taille 3. Si l
</div>
</div>
</div>
<div class="sect1">
<h2 id="_licence">Licence</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Cette application est placée sous licence "Creative Commons
Attribution - Pas d’Utilisation Commerciale 4.0 - International"</p>
</div>
<div class="paragraph">
<p>Pour accéder à une copie de cette licence, merci de vous rendre à
l&#8217;adresse suivante :
<a href="https://creativecommons.org/licenses/by-nc/4.0/deed.fr" class="bare" target="_blank" rel="noopener">creativecommons.org/licenses/by-nc/4.0/deed.fr</a></p>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
Version 1.2 2021-07-24<br>
Last updated 2021-07-24 10:33:12 +0200
Version 1.3 2021-07-27<br>
Last updated 2021-07-27 13:23:09 +0200
</div>
</div>
</body>
......
documentation/images/results_1.png

153 KB | W: | H:

documentation/images/results_1.png

160 KB | W: | H:

documentation/images/results_1.png
documentation/images/results_1.png
documentation/images/results_1.png
documentation/images/results_1.png
  • 2-up
  • Swipe
  • Onion skin
documentation/images/results_6.png

151 KB | W: | H:

documentation/images/results_6.png

158 KB | W: | H:

documentation/images/results_6.png
documentation/images/results_6.png
documentation/images/results_6.png
documentation/images/results_6.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -3,33 +3,35 @@ import os
from pandas.io.parsers import read_csv
import sys
# arguments [nb_gen, nb_plots, csv_file, title, f1, f2, f3]
# arguments [nb_gen, nb_plots, csv_file, title, f1, f2, f3]
if len(sys.argv) != 8:
print(
"Usage : " + sys.argv[0] + " <nb of generations> <nb of plots> <csv file> <title> <f1> <f2> <f3>",
"Usage : "
+ sys.argv[0]
+ " <nb of generations> <nb of plots> <csv file> <title> <f1> <f2> <f3>",
file=sys.stderr,
)
exit(1)
if sys.argv[4] :
if sys.argv[4]:
titre = sys.argv[4]
else :
else:
titre = "Results"
if sys.argv[5] :
if sys.argv[5]:
name_x = sys.argv[5]
else :
else:
name_x = "f1"
if sys.argv[6] :
if sys.argv[6]:
name_y = sys.argv[6]
else :
else:
name_y = "f2"
if sys.argv[7] :
if sys.argv[7]:
name_z = sys.argv[7]
else :
else:
name_z = "f3"
df = read_csv(
......@@ -40,9 +42,7 @@ fig = px.scatter_3d(
df, x="f1", y="f2", z="f3", color="f2", size="f3", size_max=18, opacity=0.7
)
fig.update_traces(
marker_colorbar_title_text=name_y
)
fig.update_traces(marker_colorbar_title_text=name_y)
fig.update_layout(
title=titre,
......
......@@ -5,7 +5,7 @@ import plotly.graph_objects as go
import sys
from math import ceil
# parameters = [nb_gen, nb_plots, title]
# parameters = [nb_gen, nb_plots, title]
if len(sys.argv) != 4:
print(
......@@ -22,9 +22,9 @@ nb_plots = int(sys.argv[2])
# plot title
if sys.argv[3]:
titre = sys.argv[3]
else :
else:
titre = "Results"
treshold = ceil(nb_gen / nb_plots)
......@@ -35,7 +35,7 @@ fig = go.Figure()
for i in range(1, nb_plots + 1):
if i == nb_plots:
n = "≤" + str((i) * treshold)
else :
else:
n = "<" + str((i) * treshold)
fig.add_trace(
......
import { AlignmentFlag, Orientation, WindowType, QDialog, QFont, QGridLayout, QLabel, QPlainTextEdit, QPushButton, QSlider, QWidget, TickPosition } from "@nodegui/nodegui";
import { general_css } from "./style";
import { run_obj } from ".";
import * as util from './utilities';
import { Advanced_option_widget } from "./advanced_option_widget";
export class Results_win {
window: QDialog;
......@@ -27,6 +29,22 @@ export class Results_win {
generate() {
var batch_size = run_obj.runned_proc;
// batch size
var bsize_label = new QLabel();
bsize_label.setText('Batch Size : ' + run_obj.runned_proc);
// batch average
var average_label = new QLabel();
var average_value: number = 0;
for (var i = 0; i < run_obj.runned_proc; i++) {
average_value += util.get_best_fitness(run_obj.run_results[i]);
}
average_value = Math.floor(average_value * 100000) / 100000;
average_value = average_value / run_obj.runned_proc;
average_value = Number(average_value.toFixed(5));
average_label.setText('Batch Average : ' + average_value);
// run number label
const run_label = new QLabel();
run_label.setText('Results for run ' + (this.slider.value() + 1));
......@@ -56,7 +74,7 @@ export class Results_win {
this.slider.setRange(1, batch_size);
this.slider.setOrientation(Orientation.Horizontal);
this.slider.setSingleStep(1);
this.slider.setPageStep(1);
this.slider.setTickPosition(TickPosition.TicksBelow);
this.slider.setTickInterval(1);
this.slider.addEventListener('valueChanged', () => {
......@@ -80,11 +98,13 @@ export class Results_win {
// display
this.layout.addWidget(run_label, 0, 0);
this.layout.addWidget(bsize_label, 1, 0);
this.layout.addWidget(average_label, 2, 0);
if (batch_size > 1)
this.layout.addWidget(slider_widget, 1, 0);
this.layout.addWidget(slider_widget, 3, 0);
this.layout.addWidget(this.console, 2, 0, 3, 0);
this.layout.addWidget(this.console, 4, 0);
this.layout.addWidget(btn_widget, 5, 0);
......
......@@ -67,3 +67,17 @@ export function print_errors(errors: string[]) {
new Win_alert(message, 'Parameters Error');
}
// return the best fitness from results
export function get_best_fitness(text: string): number {
var res: number = 0;
var row = text.split('\n');
for (var i = 0; i < row.length; i++) {
if (row[i].startsWith('EASEA LOG [INFO]: Best fitness:')) {
res = Number(row[i].split(':')[2]);
}
}
return res
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment