changhoonhahn / gqp_mc

GQP mock challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prior imposed on SFH

changhoonhahn opened this issue · comments

In sfh_basis_transform.ipynb I find that using Dirichlet priors on the SFH basis coefficients imposes a strange prior distribution on SFR, and thus SFH.

Here's the prior distribution on log SSFR (for 1 Gyr and 100 Myr) imposed by the Dirichlet prior.
image
The prior is a function of redshift.

This may be contributing to why we find discrepancies in the inferred galaxy properties. This is related to what Joel found in his Prospector papers that inferred galaxy properties are prior-driven.

Ran a sanity check on the MCMC pipeline in nb/emulator_mcmc_sanity.ipynb

  1. generating "observations" using the model and some theta.
  2. fitting the "observations" using the same model to see if the inferred posteriors reproduce the input theta

image
MCMC was not able to precisely reproduce the input theta. Perhaps this is due to the Dirichlet prior? Lets try with uniform prior distributions

One possible solution to this prior issue is to use impose maximum entropy prior corrections via importance sampling on the MCMC chains in order to impose uninformative priors on SFR.

In max_entropy_prior_correction.ipynb, I demonstrate how this works without including the likelihood (only prior):
image

The method works for both SSFR and log SSFR.

Further updates to max_entropy_prior_correction.ipynb where I applied the maximum entropy prior correction via importance weights to the iSpeculator model=emulator MCMC chains.

Imposing a flat prior on SSFR does not significantly impact M*. However, it substantially impacts the inferred log SFRs.
Screen Shot 2020-08-24 at 3 22 16 PM

Note that in the figure above it appears that imposing flat prior on SSFR increases the deviation from the true SFR. This, however, is not a fair comparison because model=emulator is very inaccurate in this part of parameter space and we use a simplified dust model. Focus only on the difference between the blue and orange scatter points.

in the latest commit f67ee9c :

  • gqp_mc.fitters has been updated to include prior corrections.

  • run/mini_mocha.py now calculates the prior correction weights and stores it in the postprocessing file

  • Implement the following test:

Generate SED using the following simple SFH parameterization
SFH = SFR_1gyr for t_lookback < 1gyr; 0 else

(1) Run inference with Gaussian prior on SFR_1gyr
(2) Run inference with flat prior on SFR_1gyr

Compare (1) + maximum entropy correction versus (2)

I tried extending the maximum entropy priors to impose uniform priors on both 100Myr and 1Gyr SFR simultaneously (see notebook. In principle, I think this should work.

The priors imposed on 100Myr and 1Gyr SSFR are more uniform, but not great:
image

I suspect this is due to inaccuracies in the KDE estimate of $P( {\rm SSFR} ,|, p_{\rm Dirichlet}({\beta}))$.

  • try GMM estimates of $P( {\rm SSFR} ,|, p_{\rm Dirichlet}({\beta}))$

The reason I was having issues imposing uniform priors on 1Gyr SSFR and 100Myr SSFR jointly is that the two parameters are highly correlated. Imposing uniform priors on both 1Gyr SSFR and 100Myr SSFR doesn't make any sense since it's impossible to have high 100Myr SSFR and low 1Gyr SSFR.

I was able to impose uniform priors on more sensible properties (SSFR and mass-weighted Z). see
notebook
image

When imposing uniform priors on derived properties it's important to check that the properties are not strongly correlated and that all parts of the prior-space are actually possible.

Here's a more indepth look at the priors imposed on SFH by SPS models with different SFH parameterizations (see notebook):
image

Based on this comparison, SPS models with tau SFH models are actually better for recovering accurate SFHs.

Adding a burst component to the SFH in addition to the NMF bases substantially relaxes the prior set on the SFH --- even more so than the tau models!
image