Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Neel Shah
NIFTy
Commits
551b7bf0
Commit
551b7bf0
authored
Jun 26, 2020
by
Philipp Arras
Browse files
Fix plotting
parent
776602fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
demos/hmc.py
View file @
551b7bf0
...
...
@@ -104,6 +104,8 @@ if __name__ == '__main__':
ESS_mean
=
[]
R_hat_mean
=
[]
if
master
:
fig
,
axes
=
plt
.
subplots
(
2
,
2
,
num
=
'results'
,
figsize
=
(
12
,
8
))
for
i
in
range
(
50
):
HMC
.
sample
(
10
)
...
...
@@ -119,8 +121,8 @@ if __name__ == '__main__':
if
not
master
:
continue
plt
.
clf
()
fig
,
axes
=
plt
.
subplots
(
2
,
2
,
num
=
'results'
,
figsize
=
(
12
,
8
)
)
for
axx
in
axes
.
ravel
()
:
axx
.
clear
(
)
axes
[
0
,
0
].
plot
(
data
.
val
,
'kx'
,
label
=
'data'
)
axes
[
0
,
0
].
plot
(
signal
(
mock_position
).
val
,
'r-'
,
label
=
'ground truth'
)
axes
[
0
,
0
].
plot
(
mean_result
.
val
,
'k-'
,
label
=
'sample mean'
)
...
...
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