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
468835a0
Commit
468835a0
authored
6 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Rename objects in the likelihood
parent
fa9df0ba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!41
Add hyper-parameter likelihood
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tupak/likelihood.py
+6
-6
6 additions, 6 deletions
tupak/likelihood.py
with
6 additions
and
6 deletions
tupak/likelihood.py
+
6
−
6
View file @
468835a0
...
...
@@ -164,19 +164,19 @@ def get_binary_black_hole_likelihood(interferometers):
class
HyperparameterLikelihood
():
def
__init__
(
self
,
samples
,
log_
hyper_prior
,
log_
run_prior
,
**
parameters
):
def
__init__
(
self
,
samples
,
hyper_prior
,
run_prior
,
**
parameters
):
self
.
samples
=
samples
self
.
log_
hyper_prior
=
log_
hyper_prior
self
.
log_
run_prior
=
log_
run_prior
self
.
hyper_prior
=
hyper_prior
self
.
run_prior
=
run_prior
self
.
parameters
=
parameters
def
log_likelihood
(
self
):
logl
=
[]
self
.
log_
hyper_prior
.
__dict__
.
update
(
self
.
parameters
)
self
.
hyper_prior
.
__dict__
.
update
(
self
.
parameters
)
for
samp
in
self
.
samples
:
logl
.
append
(
logsumexp
(
np
.
sum
(
np
.
log
(
self
.
log_
hyper_prior
.
prob
(
samp
)))
-
np
.
sum
(
np
.
log
(
self
.
log_
run_prior
.
prob
(
samp
)))))
logsumexp
(
np
.
sum
(
np
.
log
(
self
.
hyper_prior
.
prob
(
samp
)))
-
np
.
sum
(
np
.
log
(
self
.
run_prior
.
prob
(
samp
)))))
return
np
.
sum
(
logl
)
def
noise_log_likelihood
(
self
):
...
...
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