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
92e4b033
Commit
92e4b033
authored
6 years ago
by
Matthew David Pitkin
Browse files
Options
Downloads
Patches
Plain Diff
sampler.py: minor fix
parent
d17fb19e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!139
Add PyMC3 sampler
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tupak/core/sampler.py
+2
-2
2 additions, 2 deletions
tupak/core/sampler.py
with
2 additions
and
2 deletions
tupak/core/sampler.py
+
2
−
2
View file @
92e4b033
...
...
@@ -1266,7 +1266,7 @@ class Pymc3(Sampler):
# check required attributes exist
if
(
not
hasattr
(
self
.
likelihood
,
'
x
'
)
or
not
hasattr
(
self
.
likelihood
,
'
y
'
)
or
not
hasattr
(
self
.
likelihood
,
'
func
'
)
or
not
hasattr
(
self
.
likelihood
,
'
func
tion
'
)
or
not
hasattr
(
self
.
likelihood
,
'
function_keys
'
)):
raise
ValueError
(
"
Poisson Likelihood does not have all the correct attributes!
"
)
...
...
@@ -1275,7 +1275,7 @@ class Pymc3(Sampler):
raise
ValueError
(
"
Prior key
'
{}
'
is not a function key!
"
.
format
(
key
))
# get rate function
rate
=
self
.
function
(
self
.
likelihood
.
x
,
**
self
.
pymc3_priors
)
rate
=
self
.
likelihood
.
function
(
self
.
likelihood
.
x
,
**
self
.
pymc3_priors
)
# set the distribution
pymc3
.
Poisson
(
'
likelihood
'
,
mu
=
rate
,
observed
=
self
.
likelihood
.
y
)
...
...
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