13#ifndef GPR_OBSERVATION_MODELS_LIKGAUSSIAN_H_
14#define GPR_OBSERVATION_MODELS_LIKGAUSSIAN_H_
67 inline void setSigma2(
const double value);
74 [[nodiscard]]
inline double getSigma2() const noexcept
84 optimize_sigma2_ = optimize;
88 return optimize_sigma2_;
106 virtual_geometries_ = geometries;
107 virtual_noise_sigma2_ = extra_sigma2;
108 ++geometry_noise_revision_;
112 return virtual_geometries_.rows();
123 const Eigen::VectorXd& extra_sigma2)
125 ++geometry_noise_revision_;
126 if (geometries.rows() != extra_sigma2.size()) {
127 robust_geometries_.resize(0, 0);
128 robust_extra_sigma2_.resize(0);
131 robust_geometries_ = geometries;
132 robust_extra_sigma2_ = extra_sigma2;
137 return robust_extra_sigma2_;
143 return geometry_noise_revision_;
163 static constexpr double kVirtualEnergyRowNoise = 1.0e6;
166 bool optimize_sigma2_ =
false;
167 Coord virtual_geometries_;
168 double virtual_noise_sigma2_ = 0.0;
169 Coord robust_geometries_;
170 Eigen::VectorXd robust_extra_sigma2_;
171 std::uint64_t geometry_noise_revision_ = 0;
double evaluateLogPrior()
Evaluate the log prior of covariance function parameters.
void evaluateTrainingCovarianceMatrix(const Coord &x, FieldMatrixd &C)
Evaluate training covariance matrix of inputs.
Eigen::VectorXd combineParameters()
Combine parameters of the gaussian likelihood into one Eigen vector.
void setPriorParametersSqrtt(const PriorBase &prior)
void setOptimizeSigma2(bool optimize) noexcept
void setParameters(const Eigen::VectorXd &w)
double getSigma2() const noexcept
Get sigma2 value (the per-row noise variance added to the energy diagonal of the training kernel by e...
bool getOptimizeSigma2() const noexcept
Eigen::VectorXd evaluateTrainingVariance(const Coord &x)
Noise on each assembly row, including virtual and robust geometry tags.
const Eigen::VectorXd & geometryExtraNoise() const noexcept
Eigen::Index virtualGeometryCount() const noexcept
void evaluateLogPriorGradient(FieldMatrixd &lpg)
Evaluate gradient of the log prior with respect to the parameters.
std::uint64_t geometryNoiseRevision() const noexcept
Revision of the virtual and per-geometry noise registrations.
void setPriorParametersGaussian(const PriorBase &prior)
void setSigma2(const double value)
Set sigma2 value.
void setVirtualGeometryNoise(const Coord &geometries, double extra_sigma2)
Register virtual (conditioning-only) geometries whose covariance rows carry extra heteroscedastic noi...
void setGeometryExtraNoise(const Coord &geometries, const Eigen::VectorXd &extra_sigma2)
Register per-geometry extra noise for every row of a geometry (energy and derivatives alike): the rob...
Class of prior parameters.
Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
Eigen::Matrix< double, EigenDynamic, EigenDynamic, FieldMatrixStorage > FieldMatrixd