fix: conditional GP w/ deterministic delays - #143
Open
jeremy-baier wants to merge 37 commits into
Open
Conversation
…matic index is passed as arg
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #141
Claude did most of the heavy lifting here, but it should be straight forward I think.