gpridge.instanton.cokriging =========================== .. py:module:: gpridge.instanton.cokriging .. autoapi-nested-parse:: 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 ------- .. autoapisummary:: gpridge.instanton.cokriging.JointEFH Functions --------- .. autoapisummary:: gpridge.instanton.cokriging.cov_hh_form gpridge.instanton.cokriging.cov_f_hform gpridge.instanton.cokriging.cov_e_hform gpridge.instanton.cokriging.check_fourth_order gpridge.instanton.cokriging.check_posterior_mean Module Contents --------------- .. py:function:: 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. .. py:function:: cov_f_hform(delta, s, p, q) cov(s·∇_w f(left), pᵀ H_w(right) q) / including k. .. py:function:: cov_e_hform(delta, p, q) cov(f(left), pᵀ H_w(right) q). .. py:function:: check_fourth_order(digits=50) SymPy identity plus a 50-digit central difference of ∂⁴k. Returns the max absolute discrepancy of the finite difference. .. py:class:: 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/ℓ. .. py:attribute:: d .. py:attribute:: length_scale .. py:attribute:: sigma_e :value: 1e-06 .. py:attribute:: sigma_f :value: 1e-06 .. py:attribute:: sigma_h :value: 1e-06 .. py:attribute:: points .. py:attribute:: energy :value: [] .. py:attribute:: force :value: [] .. py:attribute:: forms :value: [] .. py:attribute:: cond :value: None .. py:attribute:: cond_scaled :value: None .. py:attribute:: marginal_value :value: None .. py:method:: add_ef(z, energy, force) .. py:method:: add_form(index, u, v, value) .. py:method:: log_marginal(ell, sigma_e, sigma_f, sigma_h) .. py:method:: fit(ell_grid, noise_grid) .. py:method:: predict_hessian(z) Posterior mean of the residual Hessian in z, shape (nq, d, d). .. py:method:: predict_gradient(z) Posterior mean of the residual force in z, shape (nq, d). .. py:function:: check_posterior_mean(step=1e-06) Float64 FD of the joint posterior mean versus predict_hessian.