Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check math and PGM diagrams are correct and consistent #10

Open
kponder opened this issue Mar 3, 2015 · 8 comments
Open

Check math and PGM diagrams are correct and consistent #10

kponder opened this issue Mar 3, 2015 · 8 comments

Comments

@kponder
Copy link
Contributor

kponder commented Mar 3, 2015

For completeness! Let's assign this to @drphilmarshall :-)

drphilmarshall added a commit to drphilmarshall/snpgm that referenced this issue Mar 20, 2015
@drphilmarshall
Copy link

OK, I have made some progress, in the master branch of my fork. I got halfway through @rbiswas4 's math, made some tweaks to try and explain what I think it meant in terms of the PGMs, and then also made a couple new PGMs. I suggest we pass this to @jmeyers314 for his comments, and perhaps some more math on the equations implied by these PGMs. Anyway, for your amusement, here are my new PGMs:

image

image

@kbarbary
Copy link
Collaborator

I might come down to stanford or slac tomorrow. Will any of you be around?
On Mar 19, 2015 7:29 PM, "Phil Marshall" notifications@github.com wrote:

OK, I have made some progress, in the master branch of my fork
https://github.com/drphilmarshall/snpgm. I got halfway through @rbiswas4
https://github.com/rbiswas4 's math, made some tweaks to try and
explain what I think it meant in terms of the PGMs, and then also made a
couple new PGMs. I suggest we pass this to @jmeyers314
https://github.com/jmeyers314 for his comments, and perhaps some more
math on the equations implied by these PGMs. Anyway, for your amusement,
here are my new PGMs:

[image: image]
https://cloud.githubusercontent.com/assets/710903/6745024/2dbacc50-ce6e-11e4-92c9-acf40e909d15.png

[image: image]
https://cloud.githubusercontent.com/assets/710903/6745029/35a2fae6-ce6e-11e4-9ca7-c611ce4e2251.png


Reply to this email directly or view it on GitHub
#10 (comment).

@drphilmarshall
Copy link

Yep, I'll be here - I expect @kponder and @jmeyers314 will be as well. Its KIPAC tea at 10:30am, you should aim to be here for 10am coffee! Great stuff, looking fwd to seeing you.

@wmwv
Copy link

wmwv commented Mar 20, 2015

@kbarbary That would be great. I'll be around all day.

@kbarbary
Copy link
Collaborator

Should we hold off on merging your master branch, @drphilmarshall?

At first glance looks fine but I haven't looked over the math closely. The pip-reqirements.txt file should be removed at some point though; not sure why @rbiswas4 added that...

@drphilmarshall
Copy link

Yeah, let's write out the importance sampling concept and formula in such a
way that matches what @rbiswas wrote, and then I'll submit a PR.

On Fri, Mar 20, 2015 at 6:08 PM, Kyle Barbary notifications@github.com
wrote:

Should we hold off on merging your master branch, @drphilmarshall
https://github.com/drphilmarshall?

At first glance looks fine but I haven't looked over the math closely. The
pip-reqirements.txt file should be removed at some point though; not sure
why @rbiswas4 https://github.com/rbiswas4 added that...


Reply to this email directly or view it on GitHub
#10 (comment).

@jmeyers314
Copy link

img_0888

Here's my attempt for including calibration, based off of Figure 1 from March++11 here: http://arxiv.org/pdf/1102.3237v4.pdf

I followed the example in this paper and included a number of deterministic relationships that, though not strictly needed since they integrate out trivially, I think help to better illustrate the relationships between variables. Note that deterministic conditional PDFs (i.e., delta functions) are indicated with orange arrows, and probabilistic ones indicated in blue.

The plates (boxes) separate variables that are indexed by SN i, band j, and epoch k. I left this a bit sloppy: e.g., if the 4th SN isn't observed in the 2nd epoch of the 6th band, then that entry in the likelihood function should just be 1.

I think this also illustrates why importance sampling is so hard for the calibration variables: they form a deterministic relationship with the variables in the interim samples, which means that when you're reweighting the samples in the outer loop of importance sampling, the weight is a ratio of delta functions with (generally) non-overlapping support.

I'll happily code this PGM up in daft, but I'll wait to hear if I made any errors first. Thanks!

@drphilmarshall
Copy link

In standard PGM style the circles with all orange arrows pointing at them
would be represented by dots (for delta function PDFs) I think - but I am
all in favour of colored graphs! Daft enable these very straightforwardly.

We realized today that in the March work, the SALT outputs re assumed to be
treatable with a multivariate Gaussian, such that under other, matching,
Gaussian assumptions, you can marginalized out the individual SN parameters
analytically. Working thi through in the calibration uncertainty model
would make for a happy weekend of Gaussian integrals :-)

An even more interesting generalization would be to replace all of March's
single Gaussians with Gaussian mixtures - but first thing first I guess.

I still think its worth trying to marginalize the calibration uncertainty
joint PDF with importance sampling!

On Monday, March 23, 2015, Josh Meyers notifications@github.com wrote:

[image: img_0888]
https://cloud.githubusercontent.com/assets/3650485/6792676/9462a03e-d177-11e4-8328-b5e4a24d583f.jpg

Here's my attempt for including calibration, based off of Figure 1 from
March++11 here: http://arxiv.org/pdf/1102.3237v4.pdf

I followed the example in this paper and included a number of
deterministic relationships that, though not strictly needed since they
integrate out trivially, I think help to better illustrate the
relationships between variables. Note that deterministic conditional PDFs
(i.e., delta functions) are indicated with orange arrows, and probabilistic
ones indicated in blue.

The plates (boxes) separate variables that are indexed by SN i, band j,
and epoch k. I left this a bit sloppy: e.g., if the 4th SN isn't observed
in the 2nd epoch of the 6th band, then that entry in the likelihood
function should just be 1.

I think this also illustrates why importance sampling is so hard for the
calibration variables: they form a deterministic relationship with the
variables in the interim samples, which means that when you're reweighting
the samples in the outer loop of importance sampling, the weight is a ratio
of delta functions with (generally) non-overlapping support.

I'll happily code this PGM up in daft, but I'll wait to hear if I made any
errors first. Thanks!


Reply to this email directly or view it on GitHub
#10 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants