Coder Social home page Coder Social logo

Comments (6)

dfm avatar dfm commented on August 16, 2024 1

@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.)

from exoplanet.

dfm avatar dfm commented on August 16, 2024

I think this would be cool, but it would probably be better to separate y from mean + light_curve since that is actually the mean. I've been working on a better GP interface, but who knows how long it will take so I'd love a pull request to dfm/exoplanet-docs that changes the notation.

from exoplanet.

mrtommyb avatar mrtommyb commented on August 16, 2024

Ok. I will try to work on it.

from exoplanet.

dfm avatar dfm commented on August 16, 2024

@mrtommyb: I implemented this on the flight to AAS. It's on the new_gp branch if you want to take a look: https://github.com/dfm/exoplanet/blob/new_gp/src/exoplanet/gp/celerite.py#L117

The syntax is now something like:

with pm.Model():
    kernel = xo.gp.terms....
    gp = xo.gp.GP(kernel, x, yerr**2, ...)
    gp.marginal("likelihood", observed=y)

from exoplanet.

bmorris3 avatar bmorris3 commented on August 16, 2024

Hi @dfm,

I'm working on a model which uses exoplanet to compute a transit+phase curve+eclipse model. I have a derived parameter (an eclipse depth) produced in my phase curve model which is wrapped in pm.Deterministic, and I would like to enforce a prior on this variable (eclipse depth), in order to be consistent with a value in the literature. I was thinking the easiest way to do this would be to run something like:

        pm.Potential('spitzer_depth_potential', pm.Normal.dist(0, 300).logp(spitzer_depth))

where spitzer_depth is the Deterministic, and its measured value is 0 ± 300 [ppm]. Will this work if I'm running gp.marginal later (like you eventually settled on) to create define the likelihood? Or is this a bad idea?

from exoplanet.

bmorris3 avatar bmorris3 commented on August 16, 2024

Thanks for this, that's definitely more readable!

from exoplanet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.