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
7c9d2080
Commit
7c9d2080
authored
5 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Changes the default number of walks to 30x ndim (previously 10x ndims).
parent
961875ca
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+3
-1
3 additions, 1 deletion
CHANGELOG.md
bilby/core/sampler/dynesty.py
+2
-2
2 additions, 2 deletions
bilby/core/sampler/dynesty.py
test/sampler_test.py
+4
-6
4 additions, 6 deletions
test/sampler_test.py
with
9 additions
and
9 deletions
CHANGELOG.md
+
3
−
1
View file @
7c9d2080
...
...
@@ -5,7 +5,9 @@
### Added
-
### Changed
-
-
Dynesty default settings changed: by default, now uses 30xndim walks. This was
shown (!564) to provide better convergence for the long-duration high-spin tests.
### Removed
-
...
...
This diff is collapsed.
Click to expand it.
bilby/core/sampler/dynesty.py
+
2
−
2
View file @
7c9d2080
...
...
@@ -55,7 +55,7 @@ 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 *
5
`
Number of walks taken if using `sample=
'
rwalk
'
`, defaults to `ndim *
30
`
dlogz: float, (0.1)
Stopping criteria
verbose: Bool
...
...
@@ -156,7 +156,7 @@ class Dynesty(NestedSampler):
def
_verify_kwargs_against_default_kwargs
(
self
):
if
not
self
.
kwargs
[
'
walks
'
]:
self
.
kwargs
[
'
walks
'
]
=
self
.
ndim
*
1
0
self
.
kwargs
[
'
walks
'
]
=
self
.
ndim
*
3
0
if
not
self
.
kwargs
[
'
update_interval
'
]:
self
.
kwargs
[
'
update_interval
'
]
=
int
(
0.6
*
self
.
kwargs
[
'
nlive
'
])
if
not
self
.
kwargs
[
'
print_func
'
]:
...
...
This diff is collapsed.
Click to expand it.
test/sampler_test.py
+
4
−
6
View file @
7c9d2080
...
...
@@ -5,7 +5,6 @@ import unittest
from
mock
import
MagicMock
import
numpy
as
np
import
os
import
sys
import
shutil
import
copy
...
...
@@ -154,14 +153,13 @@ class TestDynesty(unittest.TestCase):
enlarge
=
None
,
bootstrap
=
None
,
vol_dec
=
0.5
,
vol_check
=
2.0
,
facc
=
0.5
,
slices
=
5
,
dlogz
=
0.1
,
maxiter
=
None
,
maxcall
=
None
,
logl_max
=
np
.
inf
,
add_live
=
True
,
print_progress
=
True
,
save_bounds
=
False
,
walks
=
2
0
,
update_interval
=
600
,
print_func
=
'
func
'
)
walks
=
6
0
,
update_interval
=
600
,
print_func
=
'
func
'
)
self
.
sampler
.
kwargs
[
'
print_func
'
]
=
'
func
'
# set this manually as this is not testable otherwise
self
.
assertListEqual
([
0
,
1
],
self
.
sampler
.
kwargs
[
'
periodic
'
])
# Check this separately
self
.
sampler
.
kwargs
[
'
periodic
'
]
=
None
# The dict comparison can't handle lists
for
key
in
self
.
sampler
.
kwargs
.
keys
():
print
(
key
)
print
(
expected
[
key
])
print
(
self
.
sampler
.
kwargs
[
key
])
print
(
"
key={}, expected={}, actual={}
"
.
format
(
key
,
expected
[
key
],
self
.
sampler
.
kwargs
[
key
]))
self
.
assertDictEqual
(
expected
,
self
.
sampler
.
kwargs
)
def
test_translate_kwargs
(
self
):
...
...
@@ -173,7 +171,7 @@ class TestDynesty(unittest.TestCase):
enlarge
=
None
,
bootstrap
=
None
,
vol_dec
=
0.5
,
vol_check
=
2.0
,
facc
=
0.5
,
slices
=
5
,
dlogz
=
0.1
,
maxiter
=
None
,
maxcall
=
None
,
logl_max
=
np
.
inf
,
add_live
=
True
,
print_progress
=
True
,
save_bounds
=
False
,
walks
=
2
0
,
update_interval
=
600
,
print_func
=
'
func
'
)
walks
=
6
0
,
update_interval
=
600
,
print_func
=
'
func
'
)
for
equiv
in
bilby
.
core
.
sampler
.
base_sampler
.
NestedSampler
.
npoints_equiv_kwargs
:
new_kwargs
=
self
.
sampler
.
kwargs
.
copy
()
...
...
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