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
ift
NIFTy
Commits
0ce57ca4
Commit
0ce57ca4
authored
Jun 18, 2018
by
Reimar H Leike
Committed by
Philipp Arras
Jun 18, 2018
Browse files
fixed a bug were residual samples were confused with actual samples
parent
432cd6c1
Pipeline
#31233
passed with stages
in 1 minute and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
demos/sampling.py
View file @
0ce57ca4
...
...
@@ -41,6 +41,7 @@ tol = 1e-3
IC
=
ift
.
GradientNormController
(
tol_abs_gradnorm
=
tol
,
iteration_limit
=
N_iter
)
inverter
=
ift
.
ConjugateGradient
(
IC
)
curv
=
ift
.
library
.
WienerFilterCurvature
(
S
=
S
,
N
=
N
,
R
=
R_p
,
inverter
=
inverter
,
sampling_inverter
=
inverter
)
m_xi
=
curv
.
inverse_times
(
j
)
samps_long
=
[
curv
.
draw_sample
(
from_inverse
=
True
)
for
i
in
range
(
N_samps
)]
tol
=
1e2
...
...
@@ -53,7 +54,7 @@ samps_short = [curv.draw_sample(from_inverse=True) for i in range(N_samps)]
sc
=
ift
.
StatCalculator
()
for
samp
in
samps_long
:
sc
.
add
(
samp
)
m_x
=
sky
(
sc
.
mean
)
m_x
=
sky
(
sc
.
mean
+
m_xi
)
plt
.
plot
(
d
.
to_global_data
(),
'+'
,
label
=
"data"
,
alpha
=
.
5
)
plt
.
plot
(
s_x
.
to_global_data
(),
label
=
"original"
)
...
...
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