Skip to content

fix: conditional GP w/ deterministic delays - #143

Open
jeremy-baier wants to merge 37 commits into
nanograv:mainfrom
jeremy-baier:fix/conditional-with-delays
Open

fix: conditional GP w/ deterministic delays#143
jeremy-baier wants to merge 37 commits into
nanograv:mainfrom
jeremy-baier:fix/conditional-with-delays

Conversation

@jeremy-baier

@jeremy-baier jeremy-baier commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Depends on #141

Claude did most of the heavy lifting here, but it should be straight forward I think.

jeremy-baier and others added 30 commits February 27, 2026 00:07
jeremy-baier and others added 7 commits July 20, 2026 12:42
Conditioning raised NotImplementedError whenever the model contained a
deterministic delay, which blocked conditional GP realizations for any
model combining a delay with a Gaussian process. That covers the solar
wind case where a deterministic mean density is sampled alongside a GP
on the perturbations.

With delays present, PulsarLikelihood.y is a CompoundDelay closure rather
than an array, and the kernelsolve helpers that conditional calls assumed
a static y. Two of the three make_kernelsolve implementations already
dispatched to a make_kernelsolve_vary sibling on callable y; this extends
the same treatment to the paths conditional uses:

- WoodburyKernel_varNP.make_kernelsolve and .make_kernelsolve_simple now
  evaluate a callable y per parameter set, following the existing pattern
  for a callable F, and report its parameters.
- The ConstantKernel-side make_kernelsolve_simple keeps precomputing
  F^T N^-1 when y is static and defers only that product when y varies.
- conditional drops the restriction and adds the delay's parameters to
  cond.params.

Verified on a solar wind model with a deterministic proxy delay plus a
time domain GP: the conditional mean is bit-identical to subtracting the
delay from the residuals and conditioning a delay-free likelihood.

Adds a regression test covering both constant and varying white noise,
checking that the delay parameters reach cond.params, that the result
matches the hand-subtracted reference, and that sample_conditional runs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Gj7jjcfUbTrSLDTx3j4QY
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

Successfully merging this pull request may close these issues.

1 participant