pHMC: Proximal Hamiltonian Monte Carlo for Non-Smooth Bayesian Inference

Implements the Proximal Hamiltonian Monte Carlo (p-HMC) algorithm for Bayesian sampling and estimation from non-differentiable target densities. The method decomposes a target potential into a smooth component f(x) and a non-smooth convex component g(x), approximating only g(x) via its Moreau-Yosida envelope while retaining exact gradient information for f(x). This approach, based on the methodology described in Shukla, Vats, and Chi (2025) <doi:10.48550/arXiv.2510.22252>, yields improved Hamiltonian conservation over full-potential smoothing approaches. The package provides generalized routines accepting user-defined probability density functions, log-likelihoods, priors, and proximal operators, together with automated hyperparameter tuning for the Moreau-Yosida regularization parameter, Markov chain Monte Carlo convergence diagnostics, effective sample size computation, and model evaluation metrics including the Akaike information criterion and Bayesian information criterion.

Getting started

Package details

AuthorShikhar Tyagi [aut, cre] (ORCID: <https://orcid.org/0000-0003-1606-0844>), Arvind Pandey [aut], Bhupendra Singh [aut], Vrijesh Tripathi [aut]
MaintainerShikhar Tyagi <shikhar1093tyagi@gmail.com>
LicenseGPL (>= 2)
Version0.1.0
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("pHMC")

Try the pHMC package in your browser

Any scripts or data that you put into this service are public.

pHMC documentation built on Aug. 21, 2026, 5:18 p.m.