question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider whether exoplanet should use DensityDist rather than Potential

See original GitHub issue

PyMC3 recommended way to include a custom likelihood function is with pm.DensityDist, e.g.

loglike = pm.DensityDist('loglike', logp, observed=y)

However in the exoplanet examples, the the GP likelihood is implemented as pm.Potential. The results are the same but it might be sensible to implement the samples using the standard PyMC3 way of doing it. Advantages include clear separating out of the observables. Additionally, some of the nice plotting functions like model_to_graphviz ignore potentials.

Here’s an example of what it would look like

pm.DensityDist("loglike", gp.log_likelihood, observed=(y - light_curve - mean))

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dfmcommented, Feb 18, 2021

@bmorris3: There shouldn’t be any issue with that syntax, but a simpler one might be:

pm.Normal("spitzer_depth_prior", mu=spitzer_depth, sigma=300, observed=0.0)

Which should work equivalently and I find somewhat more readable. (You can think of this “prior” as, instead, “data” from a previous experiment.)

0reactions
bmorris3commented, Feb 18, 2021

Thanks for this, that’s definitely more readable!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Consider whether exoplanet should use DensityDist rather ...
Potential. The results are the same but it might be sensible to implement the samples using the standard PyMC3 way of doing it....
Read more >
Methods of detecting exoplanets - Wikipedia
1 Established detection methods. 1.1 Radial velocity · 2 Other possible methods. 2.1 Flare and variability echo detection · 3 Detection of extrasolar...
Read more >
The Habitable Zone | The Search For Life
The definition of “habitable zone” is the distance from a star at which liquid water could exist on orbiting planets' surfaces.
Read more >
Scientists Discover a Planet With the Potential to Support Life
Still, some traits might work against the planet's potential habitability: It is larger than Earth, and it might be receiving a high level...
Read more >
The future of spectroscopic life detection on exoplanets - NCBI
There will be such a small number of potentially habitable planets ... Instead, astronomers have found that exoplanets and exoplanetary ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found