Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Container Registry
Model registry
Operate
Environments
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
lscsoft
bilby
Commits
074c2926
Commit
074c2926
authored
5 years ago
by
Moritz Huebner
Browse files
Options
Downloads
Plain Diff
Merge branch 'bayesian-model-dimensionality' into 'master'
Bayesian model dimensionality See merge request
!447
parents
b26a5a98
42523fb1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!447
Bayesian model dimensionality
Pipeline
#58591
passed
5 years ago
Stage: test
Changes
1
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bilby/core/result.py
+13
-0
13 additions, 0 deletions
bilby/core/result.py
with
13 additions
and
0 deletions
bilby/core/result.py
+
13
−
0
View file @
074c2926
...
...
@@ -535,6 +535,19 @@ class Result(object):
"""
return
self
.
posterior_volume
/
self
.
prior_volume
(
priors
)
@property
def
bayesian_model_dimensionality
(
self
):
"""
Characterises how many parameters are effectively constraint by the data
See <https://arxiv.org/abs/1903.06682>
Returns
-------
float: The model dimensionality
"""
return
2
*
(
np
.
mean
(
self
.
posterior
[
'
log_likelihood
'
]
**
2
)
-
np
.
mean
(
self
.
posterior
[
'
log_likelihood
'
])
**
2
)
def
get_one_dimensional_median_and_error_bar
(
self
,
key
,
fmt
=
'
.2f
'
,
quantiles
=
(
0.16
,
0.84
)):
"""
Calculate the median and error bar for a given key
...
...
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