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

Derivatives w.r.t. noise parameters for derivative-aware MCMC methods #1420

Open
abhisrkckl opened this issue Oct 12, 2022 · 0 comments
Open
Assignees

Comments

@abhisrkckl
Copy link
Contributor

The timing model parameters implement two types of derivatives - d_delay_d_PARAM or d_phase_d_PARAM depending on whether they enter the timing model via a delay or a phase correction. These types of derivatives are not appropriate for noise parameters as the timing residuals do not depend on them.

To implement a derivative-aware MCMC method (#1303) such as HMC, we need derivatives of the form d_lnlikelihood_d_PARAM, where lnlikelihood contains both the "chi-squared" term and the normalization term. For timing model parameters it is easy to get these derivatives using the design matrix, which in turn is computed using the d_delay_d_PARAM and d_phase_d_PARAM functions.

We should implement derivative functions so that we can compute d_lnlikelihood_d_PARAM for noise parameters. These parameters enter the lnlikelihood function via the covariance matrix, which is computed as
C = N + F^T Φ F
where N is the diagonal white noise covariance matrix (containing scaled toa uncertainties), F is the correlated noise basis and Φ is the diagonal correlated noise weight matrix.

I propose we implement the following:

  • For white noise parameters (EFAC and EQUAD) - d_scaledtoaerrs_d_PARAM
  • For correlated noise parameters - d_noiseweights_d_PARAM and d_noisebasis_d_PARAM

For most correlated noise parameters only d_noiseweights_d_PARAM will be present as the noise basis is independent of the model parameters (see #1363). d_noisebasis_d_PARAM will be needed only in rare cases, such as as-yet-unimplemented TNREDFLOW parameter (fundamental frequency of the red noise basis).

@abhisrkckl abhisrkckl self-assigned this Oct 20, 2022
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

1 participant