Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sylvia Biscoveanu
bilby
Commits
a8ea8790
Commit
a8ea8790
authored
3 years ago
by
Matthew David Pitkin
Browse files
Options
Downloads
Patches
Plain Diff
Make default dynesty walks explicit to be 100 in docstring (and make consistent elsewhere)
parent
63254527
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bilby/core/sampler/dynesty.py
+7
-5
7 additions, 5 deletions
bilby/core/sampler/dynesty.py
with
7 additions
and
5 deletions
bilby/core/sampler/dynesty.py
+
7
−
5
View file @
a8ea8790
...
...
@@ -101,7 +101,9 @@ class Dynesty(NestedSampler):
Method used to sample uniformly within the likelihood constraints,
conditioned on the provided bounds
walks: int
Number of walks taken if using `sample=
'
rwalk
'
`, defaults to `ndim * 10`
Number of walks taken if using `sample=
'
rwalk
'
`, defaults to `100`.
Note that the default `walks` in dynesty itself is 25, although using
`ndim * 10` can be a reasonable rule of thumb for new problems.
dlogz: float, (0.1)
Stopping criteria
verbose: Bool
...
...
@@ -212,7 +214,7 @@ class Dynesty(NestedSampler):
def
_verify_kwargs_against_default_kwargs
(
self
):
from
tqdm.auto
import
tqdm
if
not
self
.
kwargs
[
'
walks
'
]:
self
.
kwargs
[
'
walks
'
]
=
self
.
ndim
*
10
self
.
kwargs
[
'
walks
'
]
=
10
0
if
not
self
.
kwargs
[
'
update_interval
'
]:
self
.
kwargs
[
'
update_interval
'
]
=
int
(
0.6
*
self
.
kwargs
[
'
nlive
'
])
if
self
.
kwargs
[
'
print_func
'
]
is
None
:
...
...
@@ -324,7 +326,7 @@ class Dynesty(NestedSampler):
"
Using the bilby-implemented rwalk sample method with ACT estimated walks
"
)
dynesty
.
dynesty
.
_SAMPLING
[
"
rwalk
"
]
=
sample_rwalk_bilby
dynesty
.
nestedsamplers
.
_SAMPLING
[
"
rwalk
"
]
=
sample_rwalk_bilby
if
self
.
kwargs
.
get
(
"
walks
"
,
25
)
>
self
.
kwargs
.
get
(
"
maxmcmc
"
):
if
self
.
kwargs
.
get
(
"
walks
"
)
>
self
.
kwargs
.
get
(
"
maxmcmc
"
):
raise
DynestySetupError
(
"
You have maxmcmc > walks (minimum mcmc)
"
)
if
self
.
kwargs
.
get
(
"
nact
"
,
5
)
<
1
:
raise
DynestySetupError
(
"
Unable to run with nact < 1
"
)
...
...
@@ -715,8 +717,8 @@ def sample_rwalk_bilby(args):
# Setup.
n
=
len
(
u
)
walks
=
kwargs
.
get
(
'
walks
'
,
25
)
# minimum number of steps
maxmcmc
=
kwargs
.
get
(
'
maxmcmc
'
,
2
000
)
# Maximum number of steps
walks
=
kwargs
.
get
(
'
walks
'
,
100
)
# minimum number of steps
maxmcmc
=
kwargs
.
get
(
'
maxmcmc
'
,
5
000
)
# Maximum number of steps
nact
=
kwargs
.
get
(
'
nact
'
,
5
)
# Number of ACT
old_act
=
kwargs
.
get
(
'
old_act
'
,
walks
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment