#include <gpr/covariance_functions/KernelOperator.h>
Classes | |
| struct | AlphaKPairInfo |
| struct | PreparedAlphaK |
Public Types | |
| enum class | HessianPrecision { Double , LongDouble } |
| using | MeanHessianMatrixFunction |
| 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 |
Public Member Functions | |
| Sexpat (const SexpatCF &primitive) | |
| Sexpat (const SexpatCF &primitive, HessianPrecision precision) | |
| Sexpat (std::shared_ptr< const SexpatCF > primitive) | |
| Sexpat (std::shared_ptr< const SexpatCF > primitive, HessianPrecision precision) | |
| void | setHessianPrecision (HessianPrecision precision) noexcept |
| HessianPrecision | hessianPrecision () const noexcept |
| void | setUseLongDoubleHessian (bool enabled) noexcept |
| bool | useLongDoubleHessian () const noexcept |
| JointCovarianceTileFunction | prepareJointCovarianceTiles (const Eigen::MatrixXd &positions) const override |
| MeanFunction | prepareMean (const Eigen::MatrixXd &training, 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 |
| MeanHessianMatrixFunction | prepareMeanHessianMatrix (const Eigen::MatrixXd &training, const Eigen::VectorXd &weights) const |
| Dense Sexpat mean Hessian from two GEMMs and the pair blocks. | |
| 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 |
| Eigen::VectorXd | energyDiagonal (const Eigen::MatrixXd &positions) const override |
| Energy self covariance at each geometry, without an all-pairs matrix. | |
| 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 |
| Assemble all Cartesian channels from one sparse pair walk per geometry. | |
| bool | prepareAlphaK (const Coord &x_train, const Eigen::Ref< const Eigen::VectorXd > &alpha_E, const Eigen::Ref< const Eigen::VectorXd > &alpha_G_flat, PreparedAlphaK &prepared) const |
| Eigen::VectorXd | applyJointCrossCovariance (const Eigen::MatrixXd &left_positions, const Eigen::MatrixXd &right_positions, const Eigen::VectorXd &weights) const override |
| void | predictMeanAlphaK (const Coord &x_train, const Coord &x_test, const Eigen::Ref< const Eigen::VectorXd > &alpha_E, const Eigen::Ref< const Eigen::VectorXd > &alpha_G_flat, Eigen::Ref< Eigen::VectorXd > mu_E_out, Eigen::Ref< Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > mu_G_out) const |
| Add the joint kernel action at query geometries to the output arrays. | |
| void | predictMeanAlphaKPrepared (const PreparedAlphaK &prepared, const Coord &x_test, Eigen::Ref< Eigen::VectorXd > mu_E_out, Eigen::Ref< Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > mu_G_out) const |
| Apply cached training weights with the same kernel parameters. | |
| void | trainingGradientAlphaK (const Coord &x_train, const Eigen::Ref< const Eigen::VectorXd > &alpha_E, const Eigen::Ref< const Eigen::VectorXd > &alpha_G_flat, Eigen::Ref< Eigen::VectorXd > quad_out, bool distributed=false, std::size_t *local_pair_count=nullptr, const linalg::MpiContext *process_group=nullptr) const |
| Public Member Functions inherited from gpr::KernelOperator | |
| virtual | ~KernelOperator ()=default |
| virtual CrossCovarianceFunction | prepareCrossCovariance (const Eigen::MatrixXd &) const |
| Eigen::MatrixXd | energyCorrelationDistances (const Eigen::MatrixXd &left_positions, const Eigen::MatrixXd &right_positions) const |
| virtual Eigen::MatrixXd | jointEnergyGradientCovariance (const Eigen::MatrixXd &positions) const |
| Joint covariance in Observation order [E; G_col0; ...; G_colD-1]. | |
| virtual Eigen::VectorXd | jointEnergyGradientDiagonal (const Eigen::MatrixXd &positions) const |
| Marginal prior variances in the same channel order as the joint matrix. | |
Inverse-distance pair-type SE primitive as a KernelOperator summand.
This wraps SexpatCF's atomistic kernel only. Geodesic add and manifold dispatch are assembled outside Sexpat as Sum and Pullback.
Definition at line 387 of file KernelOperator.h.
Definition at line 456 of file KernelOperator.h.
|
strong |
Definition at line 409 of file KernelOperator.h.
|
explicit |
Definition at line 661 of file SexpatCF.cpp.
| gpr::Sexpat::Sexpat | ( | const SexpatCF & | primitive, |
| HessianPrecision | precision ) |
Definition at line 666 of file SexpatCF.cpp.
|
explicit |
Definition at line 671 of file SexpatCF.cpp.
| gpr::Sexpat::Sexpat | ( | std::shared_ptr< const SexpatCF > | primitive, |
| HessianPrecision | precision ) |
Definition at line 681 of file SexpatCF.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 1098 of file SexpatOperator.cpp.
|
nodiscardoverridevirtual |
Covariance between one channel at each set of geometry rows.
Implements gpr::KernelOperator.
Definition at line 701 of file SexpatCF.cpp.
|
nodiscardoverridevirtual |
Energy self covariance at each geometry, without an all-pairs matrix.
Reimplemented from gpr::KernelOperator.
Definition at line 691 of file SexpatCF.cpp.
|
inlinenodiscardnoexcept |
Definition at line 427 of file KernelOperator.h.
|
nodiscardoverridevirtual |
Assemble all Cartesian channels from one sparse pair walk per geometry.
Reimplemented from gpr::KernelOperator.
Definition at line 121 of file SexpatOperator.cpp.
|
inlinenodiscardoverridevirtualnoexcept |
Reimplemented from gpr::KernelOperator.
Definition at line 463 of file KernelOperator.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 178 of file SexpatOperator.cpp.
| void gpr::Sexpat::predictMeanAlphaK | ( | const Coord & | x_train, |
| const Coord & | x_test, | ||
| const Eigen::Ref< const Eigen::VectorXd > & | alpha_E, | ||
| const Eigen::Ref< const Eigen::VectorXd > & | alpha_G_flat, | ||
| Eigen::Ref< Eigen::VectorXd > | mu_E_out, | ||
| Eigen::Ref< Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > | mu_G_out ) const |
Add the joint kernel action at query geometries to the output arrays.
Definition at line 1131 of file SexpatOperator.cpp.
| void gpr::Sexpat::predictMeanAlphaKPrepared | ( | const PreparedAlphaK & | prepared, |
| const Coord & | x_test, | ||
| Eigen::Ref< Eigen::VectorXd > | mu_E_out, | ||
| Eigen::Ref< Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > | mu_G_out ) const |
Apply cached training weights with the same kernel parameters.
Definition at line 1338 of file SexpatOperator.cpp.
|
nodiscard |
Prepare Cartesian derivative weights in active pair coordinates. Uniform translation weights vanish exactly for moving-moving pairs.
Definition at line 1145 of file SexpatOperator.cpp.
|
nodiscardoverridevirtual |
Own geometry and parameters for repeated single-geometry [E; G] tiles. The arguments index the supplied rows. An empty function requests evaluation through jointEnergyGradientCrossCovariance.
Reimplemented from gpr::KernelOperator.
Definition at line 151 of file SexpatOperator.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 1055 of file SexpatOperator.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 1011 of file SexpatOperator.cpp.
|
nodiscard |
Dense Sexpat mean Hessian from two GEMMs and the pair blocks.
Definition at line 975 of file SexpatOperator.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 188 of file SexpatOperator.cpp.
|
inlinenoexcept |
Definition at line 423 of file KernelOperator.h.
|
inlinenoexcept |
Definition at line 431 of file KernelOperator.h.
| void gpr::Sexpat::trainingGradientAlphaK | ( | const Coord & | x_train, |
| const Eigen::Ref< const Eigen::VectorXd > & | alpha_E, | ||
| const Eigen::Ref< const Eigen::VectorXd > & | alpha_G_flat, | ||
| Eigen::Ref< Eigen::VectorXd > | quad_out, | ||
| bool | distributed = false, | ||
| std::size_t * | local_pair_count = nullptr, | ||
| const linalg::MpiContext * | process_group = nullptr ) const |
Add alpha^T (dK/dtheta) alpha for log amplitude and log lengths. Local evaluation enters no MPI collectives. Distributed evaluation assigns each symmetric training pair to one rank and reduces once.
Definition at line 1599 of file SexpatOperator.cpp.
|
inlinenodiscardnoexcept |
Definition at line 436 of file KernelOperator.h.