struct gpr::AtomicInducingPosterior::Impl¶
Overview¶
struct Impl {
// structs
struct Environment;
struct Evaluation;
struct Parameters;
struct PendingEvaluation;
struct PriorTracePair;
struct Statistics;
struct TrainingEnvironment;
struct Whitening;
// fields
std::shared_ptr<const linalg::MpiCommunicator> communication;
Observation observations;
SpeciesEnvironmentKernel::Descriptor descriptor;
SpeciesEnvironmentKernel::Descriptor values_descriptor;
SpeciesEnvironmentKernel::SupportedDescriptor supported_descriptor;
Basis basis;
std::vector<int> species;
std::vector<TrainingEnvironment> local_environments;
double relative_jitter = 0.0;
double energy_reference = 0.0;
bool prepared = false;
bool fitted = false;
Parameters fitted_parameters;
Matrix inducing_lower;
std::unique_ptr<linalg::KernelInverse> posterior_factor;
Vector coefficients;
std::mutex pending_mutex;
std::unique_ptr<PendingEvaluation> pending_evaluation;
// methods
void clearPending();
void retainEvaluation(const Vector& theta, Evaluation evaluation);
std::unique_ptr<PendingEvaluation> takePending(const Vector& theta);
linalg::MpiContext context() const;
Eigen::Index dimensions() const;
Eigen::Index parameters() const;
void clearFit();
void requireFit() const;
template <class Environments>
void validateValues(const Environments& environment) const;
void validateEnvironment(const AtomicEnvironments& environment) const;
Environment cacheEnvironment(AtomicEnvironments environment) const;
Environment cacheEnvironment(SupportedAtomicEnvironments environment) const;
Environment descriptorRows(const Vector& position) const;
std::vector<PriorTracePair> cachePriorTrace(const Environment& environment) const;
Vector priorTrace(const std::vector<PriorTracePair>& pairs, const Parameters& params) const;
Parameters parse(const Vector& theta) const;
std::vector<Matrix> inducingKernel(const Parameters& params) const;
Whitening whitening(const Parameters& params) const;
std::vector<Matrix> crossRows(const Environment& cached, const Parameters& params, bool derivatives, bool energy_only = false) const;
std::vector<Vector> priorDiagonal(const Environment& cached, const Parameters& params, bool derivatives, bool energy_only = false) const;
Matrix priorBlock(const Environment& left, const Environment& right, const Parameters& params) const;
Statistics statistics(const Parameters& params, const Whitening& transform) const;
Evaluation evaluate(const Vector& theta) const;
Environment query(const Eigen::VectorXd& position) const;
Environment queryValues(const Eigen::VectorXd& position) const;
void validateQueries(const EigenMatrix& positions) const;
static Matrix whitenRows(const Matrix& rows, const Matrix& lower);
};
Detailed Documentation¶
Methods¶
std::vector<Vector> priorDiagonal(const Environment& cached, const Parameters& params, bool derivatives, bool energy_only = false) const
Direct prior diagonals require only vectors of Cartesian components.