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
7cb023fa
Commit
7cb023fa
authored
Jun 08, 2020
by
Jaime Arias
Browse files
update plot script
parent
46a392ba
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
scripts/plot-results.ipynb
View file @
7cb023fa
This diff is collapsed.
Click to expand it.
scripts/plot-results.py
View file @
7cb023fa
...
...
@@ -399,7 +399,7 @@ myPlot.on('plotly_click', function(data){
"""
# In[
7
]:
# In[
8
]:
def
create_figure_explored_states
(
table_explored_states
,
model
):
...
...
@@ -426,11 +426,13 @@ def create_figure_explored_states(table_explored_states, model):
table_stats
=
table_model
.
groupby
([
'property'
]).
agg
([
'mean'
])
fig
=
go
.
Figure
()
max_x
=
0
for
p
in
table_stats
.
index
:
data
=
table_model
[
table_model
.
property
==
p
]
stats
=
table_stats
.
loc
[
p
]
x_axis
=
np
.
arange
(
1
,
data
[
'formula'
].
count
()
+
1
,
1
)
max_x
=
max
(
max_x
,
x_axis
[
-
1
]
+
1
)
mean
=
stats
[
'explored_states'
,
'mean'
]
figure
=
px
.
scatter
(
data
,
...
...
@@ -457,7 +459,7 @@ def create_figure_explored_states(table_explored_states, model):
fig
.
update_layout
(
title_text
=
model
,
title
=
LAYOUT_FIGURES
[
'title'
],
width
=
500
,
height
=
500
,
margin
=
dict
(
r
=
110
))
fig
.
update_xaxes
(
title
=
"formula"
,
range
=
[
x_axis
[
0
]
-
1
,
x_axis
[
-
1
]
+
1
])
fig
.
update_xaxes
(
title
=
"formula"
,
range
=
[
0
,
max_x
])
fig
.
update_yaxes
(
title
=
"# explored states"
)
fig
.
update_annotations
(
dict
(
...
...
@@ -469,7 +471,7 @@ def create_figure_explored_states(table_explored_states, model):
return
fig
# In[
8
]:
# In[
9
]:
# Experiment filters
...
...
@@ -588,7 +590,7 @@ plots = {
# # Load Data
# In[
9
]:
# In[
10
]:
# Root folder
...
...
@@ -602,7 +604,7 @@ OUTPUT_FOLDER = os.path.join(PROJECT_FOLDER,"results", "figures")
create_folder
(
OUTPUT_FOLDER
)
# In[1
0
]:
# In[1
1
]:
# read data
...
...
@@ -615,7 +617,7 @@ df = df.drop(columns=['strategy', 'num_nodes', 'num_threads'])
df
.
head
()
# In[1
1
]:
# In[1
2
]:
# ground truth for properties
...
...
@@ -635,7 +637,7 @@ p_df.sort_index(inplace=True)
p_df
.
head
()
# In[1
2
]:
# In[1
3
]:
# table with times, verification output and error for each experiment
...
...
@@ -645,14 +647,14 @@ table.head()
# # Preprocessing of data
# In[1
3
]:
# In[1
4
]:
ZERO
=
10e-5
TIMEOUT
=
10
*
60
# 10 minutes = 600 seconds
# In[1
4
]:
# In[1
5
]:
# table with times for each experiment
...
...
@@ -670,7 +672,7 @@ table_time = pd.concat([table_time, p_df], axis=1)
table_time
.
head
()
# In[1
5
]:
# In[1
6
]:
# table with verification output for each experiment
...
...
@@ -685,7 +687,7 @@ table_property = pd.concat([table_property, p_df], axis=1)
table_property
.
head
()
# In[1
6
]:
# In[1
7
]:
# table with error for each experiment
...
...
@@ -694,7 +696,7 @@ table_error = table['error'].copy()
table_error
.
head
()
# In[1
7
]:
# In[1
8
]:
# table with explored states for each experiment using ltsmin
...
...
@@ -712,7 +714,7 @@ table_explored_states = table_explored_states.reset_index()
table_explored_states
.
head
()
# In[1
8
]:
# In[1
9
]:
# calculate the stats of the number of explored states
...
...
@@ -724,22 +726,22 @@ table_explored_states_stats.head()
# # Examples
# In[1
9
]:
# In[
2
1]:
create_figure_explored_states
(
table_explored_states
,
'
robot20
'
)
create_figure_explored_states
(
table_explored_states
,
'
spool1
'
)
# In[2
0
]:
# In[2
2
]:
create_figure
(
df
,
"
philo10
"
)
create_figure
(
df
,
"
spool1
"
)
# In[2
1
]:
# In[2
5
]:
create_log_figure
(
table_time
,
table_error
,
"
philo10
"
,
"pmc-sog_otf_couv99-default_2_
8
"
,
"pnml2lts-mc_dfs_1_16"
,
True
,
open_logs_callback
)
create_log_figure
(
table_time
,
table_error
,
"
spool1
"
,
"pmc-sog_otf_couv99-default_2_
16
"
,
"pnml2lts-mc_dfs_1_16"
,
True
,
open_logs_callback
)
# # Generate Figures
...
...
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