Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jayant Khatkar
tempaware
Commits
e1f88c77
Commit
e1f88c77
authored
Oct 11, 2021
by
Jayant Khatkar
Browse files
plot graph of 10 models
parent
42cbea0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
main.jl
View file @
e1f88c77
...
...
@@ -88,4 +88,7 @@ plot(rl, cdata)
# rollout order animated
rl
=
random_rollout
(
cdata
)
rl
=
Vector
(
1
:
length
(
rl
))
@time
plot_animate
(
rl
,
cdata
)
\ No newline at end of file
@time
plot_animate
(
rl
,
cdata
)
# plot results
plot
(
results
)
\ No newline at end of file
utils.jl
View file @
e1f88c77
...
...
@@ -7,7 +7,7 @@ using Statistics
using
BenchmarkTools
using
LinearAlgebra
using
PlotlyJS
import
PlotlyJS
:
plot
import
PlotlyJS
:
plot
,
scatter
using
Colors
using
Plots
...
...
@@ -688,6 +688,18 @@ function plot_animate(rl::Vector{Int}, cdata::contourdata; cam=(45,45), rate=1)
end
function
plot
(
results
::
Dict
)
rkey
=
keys
(
results
)
default_costs
=
[
results
[
k
][
"cost_default"
]
for
k
in
rkey
]
random_costs
=
[
results
[
k
][
"cost_random"
]
for
k
in
rkey
]
local_costs
=
[
results
[
k
][
"cost_local"
]
for
k
in
rkey
]
trace2
=
scatter
(
x
=
rkey
,
y
=
random_costs
./
default_costs
,
name
=
"Random"
)
trace3
=
scatter
(
x
=
rkey
,
y
=
local_costs
./
default_costs
,
name
=
"Local Search"
)
traces
=
[
trace2
,
trace3
]
plot
(
traces
)
end
function
update_result
(
results
::
Dict
,
obj
::
String
,
...
...
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