KernelMix: Bayesian kernel machine regression in Python
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.
Create a lesson
Related papers
Norm-equation methods for structured group-penalized regression
Shared title terminology · Jiayi Yu, Baisuo Jin
Bayesian Computation of Copula-based Multivariate Models with an Application to Doping Detection
Shared title terminology · Emanuele Masillo, Eva Pigi Viltanioti, Nina Deliu et al.
CONGA: Compiling Gaussian Fiber Geometry for Structured Bayesian Inference
Shared title terminology · Víctor Gallego
Sticky Manifold Piecewise Deterministic Monte Carlo for Bayesian Model Averaging
Shared title terminology · Hirofumi Shiba, Luke Hardcastle, Kengo Kamatani
Sampling the Funnel: A Comprehensive Survey of Hamiltonian Monte Carlo for Hierarchical Bayesian Inference
Shared title terminology · Miguel Fernandez-de-Retana, Aitor Almeida
A Generalized Bayesian Approach to Clustering with Dimension Reduction
Shared title terminology · Shen Jia, Weipeng Huang, Geng Yang et al.