KernelMix: Bayesian kernel machine regression in Python

Exposures measured together can have nonlinear associations with an outcome, and the association with one exposure may depend on another. Bayesian kernel machine regression represents these patterns through a flexible exposure–response function. We implement this approach in KernelMix, a Python package. To handle different outcome types, KernelMix combines the exposure function with continuous, binary, count and survival models, including selected extensions for clustered observations and censored event times. For fitted models, it returns posterior summaries, uncertainty intervals, joint predictions and sampling diagnostics. Fitting and prediction use NumPy and SciPy without requiring R. To assess the implementation, we compare selected Gaussian and probit posterior summaries and conditional calculations with installed R bkmr 0.2.2 and check additional model components against independent mathematical calculations. A daily ozone analysis illustrates how these components form an analysis workflow.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-10-27
DOI
https://doi.org/10.5281/zenodo.23697099
Primary Topic
Gaussian Processes and Bayesian Inference
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

KernelMix: Bayesian kernel machine regression in Python

Nilson Chapagain
3 links
Zenodo (CERN European Organization for Nuclear Research)
Gaussian Processes and Bayesian Inference
preprint

KernelMix: Bayesian kernel machine regression in Python

Nilson Chapagain
preprint en

Abstract

Exposures measured together can have nonlinear associations with an outcome, and the association with one exposure may depend on another. Bayesian kernel machine regression represents these patterns through a flexible exposure–response function. We implement this approach in KernelMix, a Python package. To handle different outcome types, KernelMix combines the exposure function with continuous, binary, count and survival models, including selected extensions for clustered observations and censored event times. For fitted models, it returns posterior summaries, uncertainty intervals, joint predictions and sampling diagnostics. Fitting and prediction use NumPy and SciPy without requiring R. To assess the implementation, we compare selected Gaussian and probit posterior summaries and conditional calculations with installed R bkmr 0.2.2 and check additional model components against independent mathematical calculations. A daily ozone analysis illustrates how these components form an analysis workflow.

Zenodo (CERN European Organization for Nuclear Research)
Texas A&M University (US)
Gaussian Processes and Bayesian Inference
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon