KernelMix: Bayesian kernel machine regression in Python
Nilson Chapagain
Key points
From the paper's conclusion- We implement this approach in KernelMix, a Python package.
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- CBKMR: A Copula-based Bayesian Kernel Machine Regression Framework for Optimal Marker Detection in Omics DatabioRxiv · 2026
- Software Application Profile: BKMR-CMA: a novel R command for Bayesian mediation analysis in environmental mixture studies.International journal of epidemiology · 2026
- Scalable Gaussian process regression via median posterior inference for estimating the health effects of an environmental mixtureBiometrics · 2026
- QuantileMix: A Python package for quantile g-computationarXiv · 2026
- A Bayesian Copula Dirichlet Process GLM for Longitudinal DataarXiv · 2026
- Scalable Logistic Gaussian Process Density Regression with Kinetic Langevin SamplingarXiv · 2026