#include <gpr/covariance_functions/AdditivePairKernel.h>
Classes | |
| struct | Pair |
| struct | PairFeatures |
Public Member Functions | |
| AdditivePairKernel (const AtomsConfiguration &configuration, Eigen::VectorXd length_scales, double magnitude_variance) | |
| double | magnitudeVariance () const noexcept |
| const Eigen::VectorXd & | lengthScales () const noexcept |
| const std::vector< Pair > & | pairs () const noexcept |
| Eigen::Index | dimensions () const noexcept |
| PairFeatures | features (const Eigen::VectorXd &positions) const |
| std::vector< PairFeatures > | rowFeatures (const Eigen::MatrixXd &positions) const |
| Eigen::MatrixXd | assemble (const std::vector< PairFeatures > &left, const std::vector< PairFeatures > &right) const |
| Joint [E; gradient] covariance between the rows of two feature sets. | |
| double | directionalInverseLength (const Eigen::VectorXd &positions, const Eigen::VectorXd &direction) const |
| Eigen::MatrixXd | covarianceBlock (const Eigen::MatrixXd &left_positions, const Eigen::MatrixXd &right_positions, Eigen::Index left_channel, Eigen::Index right_channel) const override |
| Covariance between one channel at each set of geometry rows. | |
| Eigen::MatrixXd | jointEnergyGradientCrossCovariance (const Eigen::MatrixXd &left_positions, const Eigen::MatrixXd &right_positions) const override |
| Cross covariance in Observation order on each operand. | |
| Eigen::MatrixXd | jointEnergyGradientCovariance (const Eigen::MatrixXd &positions) const override |
| Joint covariance in Observation order [E; G_col0; ...; G_colD-1]. | |
| Eigen::VectorXd | energyDiagonal (const Eigen::MatrixXd &positions) const override |
| Energy self covariance at each geometry, without an all-pairs matrix. | |
| MeanFunction | prepareMean (const Eigen::MatrixXd &training, const Eigen::VectorXd &weights) const override |
| CrossCovarianceFunction | prepareCrossCovariance (const Eigen::MatrixXd &training) const override |
| Eigen::VectorXd | applyJointCrossCovariance (const Eigen::MatrixXd &left_positions, const Eigen::MatrixXd &right_positions, const Eigen::VectorXd &weights) const override |
| MeanHessianFunction | prepareMeanHessianVector (const Eigen::MatrixXd &training, const Eigen::VectorXd &weights) const override |
| MeanHessianPreparation | prepareMeanHessian (const Eigen::MatrixXd &training, const Eigen::VectorXd &weights) const override |
| MeanCurvature | meanCurvature () const noexcept override |
| bool | meanHessianVector (const Coord &training, const Eigen::VectorXd &weights, const Eigen::VectorXd &position, const Eigen::VectorXd &direction, Eigen::VectorXd &action) const override |
| Public Member Functions inherited from gpr::KernelOperator | |
| virtual | ~KernelOperator ()=default |
| virtual JointCovarianceTileFunction | prepareJointCovarianceTiles (const Eigen::MatrixXd &) const |
| Eigen::MatrixXd | energyCorrelationDistances (const Eigen::MatrixXd &left_positions, const Eigen::MatrixXd &right_positions) const |
| virtual Eigen::VectorXd | jointEnergyGradientDiagonal (const Eigen::MatrixXd &positions) const |
| Marginal prior variances in the same channel order as the joint matrix. | |
Static Public Member Functions | |
| static std::vector< Pair > | enumeratePairs (const AtomsConfiguration &configuration, Eigen::Index length_count) |
| static std::vector< Eigen::MatrixXd > | jointWithLogLengthDerivatives (const std::vector< PairFeatures > &features, const std::vector< Pair > &pairs, Eigen::Index dimensions, const Eigen::VectorXd &length_scales, double magnitude_variance, const std::vector< Eigen::Index > &types, const linalg::MpiContext &communication=linalg::MpiContext::local(), const linalg::LocalExecutor &execution=linalg::LocalExecutor{}) |
| static Eigen::VectorXd | contractJointLogLengthDerivatives (const std::vector< PairFeatures > &features, const std::vector< Pair > &pairs, Eigen::Index dimensions, const Eigen::VectorXd &length_scales, double magnitude_variance, const std::vector< Eigen::Index > &types, const Eigen::MatrixXd &weight, const linalg::MpiContext &communication=linalg::MpiContext::local(), const linalg::LocalExecutor &execution=linalg::LocalExecutor{}) |
Additional Inherited Members | |
| Public Types inherited from gpr::KernelOperator | |
| enum class | MeanHessianStatus { Computed , Refused , Unavailable } |
| enum class | MeanCurvature { Unknown , Exact , Refused } |
| using | MeanFunction = std::function<Eigen::VectorXd(const Eigen::MatrixXd&)> |
| using | CrossCovarianceFunction |
| using | JointCovarianceTileFunction |
| using | MeanHessianFunction |
| using | HessianAction |
| using | MeanHessianPreparation |
| using | MeanHessianMatrixFunction |
Sum over pairs of one squared-exponential covariance per pair type on the inverse distance,
k(x, x') = m sum_t sum_{p in t(x)} sum_{q in t(x')} exp(-(u_p - u'_q)^2 / (2 l_t^2)), u = 1 / r,
with the pair types of the Sexpat kernel. The joint exponential over all pair coordinates treats "compress pair p" and "compress pair q" as unrelated directions, so one measured bond compression teaches the posterior nothing about the other bonds of the same type; here every pair of a type shares one scalar process, so a single row moves them all.
Definition at line 30 of file AdditivePairKernel.h.
| gpr::AdditivePairKernel::AdditivePairKernel | ( | const AtomsConfiguration & | configuration, |
| Eigen::VectorXd | length_scales, | ||
| double | magnitude_variance ) |
One length scale per pair type of the configuration; pairs whose type has no length scale are inactive.
Definition at line 172 of file AdditivePairKernel.cpp.
|
nodiscardoverridevirtual |
Contract the joint cross covariance with coefficients in [E; G] order. Operators can apply their feature contractions without a dense tensor.
Reimplemented from gpr::KernelOperator.
Definition at line 633 of file AdditivePairKernel.cpp.
|
nodiscard |
Joint [E; gradient] covariance between the rows of two feature sets.
Definition at line 262 of file AdditivePairKernel.cpp.
|
staticnodiscard |
Frobenius products with the log-amplitude and requested log-length derivatives, without allocating a covariance matrix per parameter.
Definition at line 330 of file AdditivePairKernel.cpp.
|
nodiscardoverridevirtual |
Covariance between one channel at each set of geometry rows.
Implements gpr::KernelOperator.
Definition at line 482 of file AdditivePairKernel.cpp.
|
inlinenodiscardnoexcept |
Definition at line 71 of file AdditivePairKernel.h.
|
nodiscard |
The largest inverse Cartesian length induced along a direction: maximize the magnitude of each pair coordinate's directional derivative divided by that pair type's fitted length scale.
Definition at line 444 of file AdditivePairKernel.cpp.
|
nodiscardoverridevirtual |
Energy self covariance at each geometry, without an all-pairs matrix.
Reimplemented from gpr::KernelOperator.
Definition at line 497 of file AdditivePairKernel.cpp.
|
staticnodiscard |
Definition at line 191 of file AdditivePairKernel.cpp.
|
nodiscard |
Definition at line 220 of file AdditivePairKernel.cpp.
|
nodiscardoverridevirtual |
Joint covariance in Observation order [E; G_col0; ...; G_colD-1].
Reimplemented from gpr::KernelOperator.
Definition at line 473 of file AdditivePairKernel.cpp.
|
nodiscardoverridevirtual |
Cross covariance in Observation order on each operand.
Reimplemented from gpr::KernelOperator.
Definition at line 466 of file AdditivePairKernel.cpp.
|
staticnodiscard |
Joint covariance of one feature set followed by its derivative with respect to the log length of every listed type, in that order.
Definition at line 286 of file AdditivePairKernel.cpp.
|
inlinenodiscardnoexcept |
Definition at line 63 of file AdditivePairKernel.h.
|
inlinenodiscardnoexcept |
Definition at line 59 of file AdditivePairKernel.h.
|
inlinenodiscardoverridevirtualnoexcept |
Reimplemented from gpr::KernelOperator.
Definition at line 139 of file AdditivePairKernel.h.
|
nodiscardoverridevirtual |
Hessian action of the scalar kernel expansion with joint [E; G] training coefficients. False denotes an unsupported derivative.
Reimplemented from gpr::KernelOperator.
Definition at line 695 of file AdditivePairKernel.cpp.
|
inlinenodiscardnoexcept |
Definition at line 67 of file AdditivePairKernel.h.
|
nodiscardoverridevirtual |
Immutable observation functionals for a fixed right operand. Query geometries are evaluated afresh; an empty function requests fallback.
Reimplemented from gpr::KernelOperator.
Definition at line 624 of file AdditivePairKernel.cpp.
|
nodiscardoverridevirtual |
Immutable fitted coefficients with fresh evaluation at every query. An empty function requests the owning generic covariance product.
Reimplemented from gpr::KernelOperator.
Definition at line 593 of file AdditivePairKernel.cpp.
|
nodiscardoverridevirtual |
Own the fitted mean coefficients and construct a scoped linear Hessian operator at each requested geometry. No query is retained by the fitted model. An empty preparation requests the directional path.
Reimplemented from gpr::KernelOperator.
Definition at line 641 of file AdditivePairKernel.cpp.
|
nodiscardoverridevirtual |
Owning fitted derivative coefficients; query geometry is evaluated afresh. An empty function requests the generic scalar-kernel action.
Reimplemented from gpr::KernelOperator.
Definition at line 683 of file AdditivePairKernel.cpp.
|
nodiscard |
Definition at line 251 of file AdditivePairKernel.cpp.