Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Heimann
grond
Commits
5a541d39
Commit
5a541d39
authored
Jun 10, 2016
by
Sebastian Heimann
Browse files
added manual factor to influence the amount of scatter of the sampler
parent
2b42ce1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core.py
View file @
5a541d39
...
...
@@ -928,6 +928,7 @@ class SolverConfig(Object):
niter_non_explorative
=
Int
.
T
(
default
=
0
)
sampler_distribution
=
SamplerDistributionChoice
.
T
(
default
=
'multivariate_normal'
)
scatter_scale
=
Float
.
T
(
default
=
1.0
)
def
get_solver_kwargs
(
self
):
return
dict
(
...
...
@@ -935,7 +936,8 @@ class SolverConfig(Object):
niter_transition
=
self
.
niter_transition
,
niter_explorative
=
self
.
niter_explorative
,
niter_non_explorative
=
self
.
niter_non_explorative
,
sampler_distribution
=
self
.
sampler_distribution
)
sampler_distribution
=
self
.
sampler_distribution
,
scatter_scale
=
self
.
scatter_scale
)
class
EngineConfig
(
HasPaths
):
...
...
@@ -1151,6 +1153,7 @@ def solve(problem,
niter_transition
=
1000
,
niter_explorative
=
10000
,
niter_non_explorative
=
0
,
scatter_scale
=
1.0
,
xs_inject
=
None
,
sampler_distribution
=
'multivariate_normal'
,
status
=
()):
...
...
@@ -1187,10 +1190,10 @@ def solve(problem,
if
niter_inject
+
niter_uniform
<=
iiter
and
\
iiter
<
niter_inject
+
niter_uniform
+
niter_transition
:
factor
=
4.0
*
(
1.0
-
(
iiter
-
niter_uniform
-
niter_inject
)
/
factor
=
scatter_scale
*
4.0
*
(
1.0
-
(
iiter
-
niter_uniform
-
niter_inject
)
/
float
(
niter_transition
))
else
:
factor
=
1.0
factor
=
scatter_scale
*
1.0
ntries_preconstrain
=
0
ntries_sample
=
0
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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