| phmc_tune | R Documentation |
Evaluates the relative Hamiltonian error metric across a grid of
candidate lambda_g values to select the optimal regularization
parameter balancing potential smoothness and Hamiltonian conservation,
as detailed in Section V of Shukla, Vats, and Chi (2025).
phmc_tune(
fn,
grad_f = NULL,
g = NULL,
prox_fn = "l1",
start,
lambda_grid = 10^seq(-5, 0, length.out = 15),
epsilon = 0.001,
L = 10,
M = NULL,
target_rel_err = 1e-04,
data = NULL,
seed = NULL,
...
)
fn |
Function. Smooth component |
grad_f |
Function or |
g |
Function or |
prox_fn |
Function or character. Proximal operator or
built-in name ( |
start |
Numeric vector. Starting parameter value. |
lambda_grid |
Numeric vector. Grid of candidate
|
epsilon |
Numeric scalar > 0. Leapfrog step size. |
L |
Integer >= 1. Number of leapfrog steps. |
M |
Mass matrix or |
target_rel_err |
Numeric scalar. Maximum acceptable relative Hamiltonian error (default 1e-4). |
data |
Optional dataset passed as second argument to |
seed |
Optional integer or |
... |
Additional arguments forwarded to |
The relative Hamiltonian error metric is defined as
R_{\lambda_g} = \left| \frac{H(x_0, p_0) -
H(\tilde{T}_{\epsilon, L}^{\lambda_g}(x_0, p_0))}{H(x_0, p_0)}
\right|.
An object of class "phmc_tune", which is a list containing:
optimal_lambda_g |
A numeric scalar of class |
grid_results |
A data frame of class |
target_rel_err |
A numeric scalar of class |
Shukla A, Vats D, Chi EC (2025). “Proximal Hamiltonian Monte Carlo.” arXiv preprint, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.48550/arXiv.2510.22252")}.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.