gpridge.instanton.cokriging¶
Cokriging variants that add Hessian information to an energy-force GP.
The analytic posterior Hessian of the energy-force model is not modified. These classes are separate trainers. Variant (a) observes the Hessian through fourth derivatives of the squared-exponential kernel. Variant (c) puts an additive discrepancy on the Hessian in the saddle eigenbasis.
Classes¶
Energy, force, and projected-Hessian cokriging in mass-weighted z. |
Functions¶
|
cov(uᵀ H_w(left) v, pᵀ H_w(right) q) for k = exp(-½‖δ‖²). |
|
cov(s·∇_w f(left), pᵀ H_w(right) q) / including k. |
|
cov(f(left), pᵀ H_w(right) q). |
|
SymPy identity plus a 50-digit central difference of ∂⁴k. |
|
Float64 FD of the joint posterior mean versus predict_hessian. |
Module Contents¶
- gpridge.instanton.cokriging.cov_hh_form(delta, u, v, p, q)¶
cov(uᵀ H_w(left) v, pᵀ H_w(right) q) for k = exp(-½‖δ‖²).
delta, u, v, p, q are vectors in w. The formula is the contraction of ∂⁴k/∂w_i∂w_j∂w’_a∂w’_b, which matches SymPy’s derivative.
- gpridge.instanton.cokriging.cov_f_hform(delta, s, p, q)¶
cov(s·∇_w f(left), pᵀ H_w(right) q) / including k.
- gpridge.instanton.cokriging.cov_e_hform(delta, p, q)¶
cov(f(left), pᵀ H_w(right) q).
- gpridge.instanton.cokriging.check_fourth_order(digits=50)¶
SymPy identity plus a 50-digit central difference of ∂⁴k.
Returns the max absolute discrepancy of the finite difference.
- class gpridge.instanton.cokriging.JointEFH(dimension, length_scale=1.0)¶
Energy, force, and projected-Hessian cokriging in mass-weighted z.
Nuggets σ_E, σ_F, σ_H are variances on the z-space observations and are chosen by a short marginal-likelihood search. The signal kernel is the unit squared exponential in w = z/ℓ.
- d¶
- length_scale¶
- sigma_e = 1e-06¶
- sigma_f = 1e-06¶
- sigma_h = 1e-06¶
- points¶
- energy = []¶
- force = []¶
- forms = []¶
- cond = None¶
- cond_scaled = None¶
- marginal_value = None¶
- add_ef(z, energy, force)¶
- add_form(index, u, v, value)¶
- log_marginal(ell, sigma_e, sigma_f, sigma_h)¶
- fit(ell_grid, noise_grid)¶
- predict_hessian(z)¶
Posterior mean of the residual Hessian in z, shape (nq, d, d).
- predict_gradient(z)¶
Posterior mean of the residual force in z, shape (nq, d).
- gpridge.instanton.cokriging.check_posterior_mean(step=1e-06)¶
Float64 FD of the joint posterior mean versus predict_hessian.