Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMC-SOG
experiments
hybrid
Commits
f1c83e0d
Commit
f1c83e0d
authored
Oct 23, 2020
by
Jaime Arias
Browse files
fix: same scale for all the figures
parent
8bb5acba
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
scripts/plot-results.ipynb
View file @
f1c83e0d
This diff is collapsed.
Click to expand it.
scripts/plot-results.py
View file @
f1c83e0d
...
...
@@ -4,6 +4,13 @@
# In[1]:
ZERO
=
10e-5
TIMEOUT
=
10
*
60
# 10 minutes = 600 seconds
# In[2]:
import
os
import
pandas
as
pd
import
numpy
as
np
...
...
@@ -49,7 +56,7 @@ LAYOUT_FIGURES = dict(
# # Auxiliary Functions
# In[
2
]:
# In[
3
]:
def
create_folder
(
path
):
...
...
@@ -69,7 +76,7 @@ def create_folder(path):
os
.
makedirs
(
path
)
# In[
3
]:
# In[
4
]:
def
create_figure
(
df
,
model
):
...
...
@@ -108,7 +115,7 @@ def create_figure(df, model):
return
figure
# In[
4
]:
# In[
5
]:
def
get_axis_title
(
experiment
,
show_strategy
=
True
):
...
...
@@ -160,7 +167,7 @@ def get_axis_title(experiment, show_strategy=True):
return
title
# In[
5
]:
# In[
6
]:
def
create_log_figure
(
table
,
table_errors
,
model
,
tool_x
,
tool_y
,
show_strategy
=
True
,
callback
=
None
):
...
...
@@ -198,13 +205,10 @@ def create_log_figure(table, table_errors, model, tool_x, tool_y, show_strategy=
>>> fig = create_log_figure(table['time'], table['error'], 'philo10', 'pmc-sog_otfL_couv99-default_1_8', 'pmc-sog_otfP_couv99-default_1_8')
"""
try
:
min_values
=
table
.
loc
[
model
].
min
()
max_values
=
table
.
loc
[
model
].
max
()
min_value
=
min
(
min_values
[
tool_x
],
min_values
[
tool_y
])
/
2.
min_value
=
ZERO
max_value
=
TIMEOUT
min_value_log
=
np
.
log10
(
min_value
)
max_value
=
max
(
max_values
[
tool_x
],
max_values
[
tool_y
])
max_value_log
=
np
.
log10
(
max_value
)
table_model
=
table
.
loc
[
model
]
...
...
@@ -284,7 +288,7 @@ def create_log_figure(table, table_errors, model, tool_x, tool_y, show_strategy=
print
(
e
)
# In[
6
]:
# In[
7
]:
import
webbrowser
...
...
@@ -399,7 +403,7 @@ myPlot.on('plotly_click', function(data){
"""
# In[
7
]:
# In[
8
]:
def
create_figure_explored_states
(
table_explored_states
,
model
):
...
...
@@ -654,13 +658,6 @@ table.head()
# In[14]:
ZERO
=
10e-5
TIMEOUT
=
10
*
60
# 10 minutes = 600 seconds
# In[15]:
# table with times for each experiment
table_time
=
table
[
'time'
].
copy
()
...
...
@@ -676,7 +673,7 @@ table_time = pd.concat([table_time, p_df], axis=1)
table_time
.
head
()
# In[1
6
]:
# In[1
5
]:
# table with verification output for each experiment
...
...
@@ -691,7 +688,7 @@ table_property = pd.concat([table_property, p_df], axis=1)
table_property
.
head
()
# In[1
7
]:
# In[1
6
]:
# table with error for each experiment
...
...
@@ -700,7 +697,7 @@ table_error = table['error'].copy()
table_error
.
head
()
# In[1
8
]:
# In[1
7
]:
# table with explored states for each experiment using ltsmin
...
...
@@ -718,7 +715,7 @@ table_explored_states = table_explored_states.reset_index()
table_explored_states
.
head
()
# In[1
9
]:
# In[1
8
]:
# calculate the stats of the number of explored states
...
...
@@ -730,19 +727,19 @@ table_explored_states_stats.head()
# # Examples
# In[
20
]:
# In[
19
]:
create_figure_explored_states
(
table_explored_states
,
'spool1'
)
# In[2
1
]:
# In[2
0
]:
create_figure
(
df
,
"spool1"
)
# In[
22
]:
# In[
]:
create_log_figure
(
table_time
,
table_error
,
"spool1"
,
"pmc-sog_otf_couv99-default_2_16"
,
"pnml2lts-mc_dfs_1_16"
,
True
,
open_logs_callback
)
...
...
@@ -750,7 +747,7 @@ create_log_figure(table_time, table_error, "spool1", "pmc-sog_otf_couv99-default
# # Generate Figures
# In[
23
]:
# In[
]:
# models
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment