class gpr::capi::FreeEnergySurrogate¶
Overview¶
Owner of a gpr_fes_t. Arrays are row-major, one row per point. More…
#include <gpr/capi/gpridge.hpp>
class FreeEnergySurrogate {
public:
// structs
struct Prediction;
// construction
FreeEnergySurrogate();
FreeEnergySurrogate(gpr_fes_t h, adopt_t);
FreeEnergySurrogate(const FreeEnergySurrogate&);
FreeEnergySurrogate(FreeEnergySurrogate&& other);
~FreeEnergySurrogate();
// methods
FreeEnergySurrogate& operator=(const FreeEnergySurrogate&);
FreeEnergySurrogate& operator=(FreeEnergySurrogate&& other);
void reset();
gpr_fes_t handle() const;
operator bool() const;
int dimension() const;
int n_observations() const;
void train(const std::vector<double>& s, const std::vector<double>& F, const std::vector<double>& F_noise_var, const std::vector<double>& grad_F, const std::vector<double>& grad_noise_var, const std::vector<std::uint8_t>& grad_present, int n_obs);
Prediction predict(const std::vector<double>& s_query, int n_queries, bool with_gradient, bool with_variance) const;
FesRateReport rate_path(const std::vector<double>& path, int n_path, int reactant_index, int product_index, const std::vector<double>& diffusion, const FesRateConfig& config) const;
static FreeEnergySurrogate create(int dimension, const ModelConfig& model_config = model_config_defaults(), const FesConfig& config = fes_config_defaults(), const std::vector<double>& grad_noise_var = {});
};
Detailed Documentation¶
Owner of a gpr_fes_t. Arrays are row-major, one row per point.
Methods¶
void train(const std::vector<double>& s, const std::vector<double>& F, const std::vector<double>& F_noise_var, const std::vector<double>& grad_F, const std::vector<double>& grad_noise_var, const std::vector<std::uint8_t>& grad_present, int n_obs)
Values only when grad_F is empty; otherwise grad_F, grad_noise_var and grad_present are all given.