Fitting Matérn Smoothness Parameters Using Automatic Differentiation

Christopher J. Geoga, Oana Marin, Michel Schanen, Michael L. Stein
1/1/2022
stat.COstat.ME

Official code: cgeoga/BesselK.jl (20 stars, Julia, MIT, last commit 2026-11-11).

Abstract

The Matérn covariance function is ubiquitous in the application of Gaussian processes to spatial statistics and beyond. Perhaps the most important reason for this is that the smoothness parameter $ν$ gives complete control over the mean-square differentiability of the process, which has significant implications for the behavior of estimated quantities such as interpolants and forecasts.

Show full abstract

Unfortunately, derivatives of the Matérn covariance function with respect to $ν$ require derivatives of the modified second-kind Bessel function $\mathcal{K}_ν$ with respect to $ν$. While closed form expressions of these derivatives do exist, they are prohibitively difficult and expensive to compute. For this reason, many software packages require fixing $ν$ as opposed to estimating it, and all existing software packages that attempt to offer the functionality of estimating $ν$ use finite difference estimates for $\partial_ν\mathcal{K}_ν$. In this work, we introduce a new implementation of $\mathcal{K}_ν$ that has been designed to provide derivatives via automatic differentiation (AD), and whose resulting derivatives are significantly faster and more accurate than those computed using finite differences. We provide comprehensive testing for both speed and accuracy and show that our AD solution can be used to build accurate Hessian matrices for second-order maximum likelihood estimation in settings where Hessians built with finite difference approximations completely fail.

View on arXivView PDF

Code Implementations(1)

cgeoga/BesselK.jlOfficial100%
MIT

An AD-compatible modified second-kind Bessel function.

201Julia, GnuplotDec 16, 20212 weeks agoMIT

Similar Papers

Cite this paper

@article{geoga2022fitting,
  title  = {Fitting Matérn Smoothness Parameters Using Automatic Differentiation},
  author = {Christopher J. Geoga and Oana Marin and Michel Schanen and Michael L. Stein},
  year   = {2022},
  eprint = {2201.00090},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.00090}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2201.00090.svg)](https://codeofpaper.com/paper/2201.00090)

Discussion