Repository navigation
feat(kernels): nonstationary (VaryingAmplitude, Gibbs) and space–time (Gneiting) kernels - #815
Open
thomaspinder wants to merge 2 commits into
Open
thomaspinder wants to merge 2 commits into
thomaspinder wants to merge 2 commits into
Conversation
…e kernels Add three kernels for climate fields (#812): - VaryingAmplitude(base_kernel, amplitude): sigma(x) sigma(y) k0(x, y). - Gibbs(base_kernel, lengthscale): the Paciorek-Schervish construction. It scales the inputs of an existing isotropic radial kernel, so all radial kernels and their ARD lengthscales work without a refactor. A new `isotropic_radial` class flag marks the valid base kernels. - Gneiting(space_dims, time_dim): the nonseparable space-time kernel of Gneiting (2002, eq. 14), with interaction parameter beta. The new gpjax.kernels.location_functions module (Constant, Linear and an abstract base class) gives parameters that change with location. They are a separate type from mean functions; ADR 0001 records why. RFF now names the kernel that it cannot approximate and points users of sample_approx to the predictive distribution. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…examples - Nonstationary Kernels over Complex Terrain: Colorado precipitation normals 1991-2020 (NOAA, public domain) with elevation as the covariate. Gibbs improves the log marginal likelihood from -283 to -218 and the held-out NLPD from 1.10 to 0.88. - Space-Time Modelling of Winter Temperature: daily NCEP-NCAR R1 temperature anomalies over Europe, Jan-Feb 2019. The nonseparable Gneiting kernel improves the log marginal likelihood by 45.6 and the held-out NLPD from 1.033 to 0.996 against its separable version. Both datasets are small netCDF3 files made by new functions in _pull_reference_datasets.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
📖 Docs preview: https://pr-815--endearing-crepe-c2d5fe.netlify.app Smoke render — the expensive notebooks run with reduced budgets, so |
This branch has not been deployed
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.
Summary
Three kernels for climate fields, as agreed in the design on #812. Fixes #812.
A location function gives a kernel parameter that changes with location. It evaluates one point, selects its own columns with
active_dims, and returns a log value. It is a separate type from mean functions; ADR 0001 gives the reason.Gibbs needs no refactor of the stationary kernels:
vmapbatches only the operations that depend on the mapped input, so a location function runs once for each row (Evidence
Tests:
uv run poe testgives 3304 passed and 1 skipped. Lint and doctests pass. The CI docs build (-E -W) gives 0 warnings.jit,gradandfitwork.Colorado precipitation normals, 247 stations (5-fold cross-validation):
Europe, daily temperature anomalies, January–February 2019 (held-out gap of 140 points):
On Irish wind (Haslett & Raftery, 1989), the profile likelihood over β was flat (Δ ≈ 1.5), because the interaction there comes from advection, which a symmetric kernel cannot model. The notebook states this limit.
Merge Danger
Door: two-way
All the changes add new API. The only change to existing behaviour is the text of the RFF
TypeError, and RFF'sbase_kernelparameter annotation, which is nowAbstractKernelso that the clear message is reached under beartype.Blast Radius: small
docs/examples/data/_pull_reference_datasets.py, so the second PR to merge gets a small conflict there.Follow-up: #813 (constrain
PoweredExponential.power).🤖 Generated with Claude Code