class gpr::LikGaussian¶
Overview¶
Gaussian noise with variance. More…
#include <gpr/observation_models/LikGaussian.h>
class LikGaussian {
public:
// construction
LikGaussian();
virtual ~LikGaussian();
// methods
double evaluateLogPrior();
void evaluateLogPriorGradient(FieldMatrixd& lpg);
void evaluateTrainingCovarianceMatrix(const Coord& x, FieldMatrixd& C);
Eigen::VectorXd evaluateTrainingVariance(const Coord& x);
void setSigma2(const double value);
double getSigma2() const;
void setOptimizeSigma2(bool optimize);
bool getOptimizeSigma2() const;
void setVirtualGeometryNoise(const Coord& geometries, double extra_sigma2);
Eigen::Index virtualGeometryCount() const;
void setGeometryExtraNoise(const Coord& geometries, const Eigen::VectorXd& extra_sigma2);
const Eigen::VectorXd& geometryExtraNoise() const;
std::uint64_t geometryNoiseRevision() const;
void setPriorParametersGaussian(const PriorBase& prior);
void setPriorParametersSqrtt(const PriorBase& prior);
void setParameters(const Eigen::VectorXd& w);
Eigen::VectorXd combineParameters();
};
Detailed Documentation¶
Gaussian noise with variance.
Methods¶
double evaluateLogPrior()
Evaluate the log prior of covariance function parameters.
This function returns
, where th collects the parameters. This function is needed when there are likelihood parameters.
void evaluateLogPriorGradient(FieldMatrixd& lpg)
Evaluate gradient of the log prior with respect to the parameters.
This function takes a Gaussian likelihood and returns
, where th is the vector of parameters. This function is needed when there are likelihood parameters.
Parameters:
lpg |
Result |
void evaluateTrainingCovarianceMatrix(const Coord& x, FieldMatrixd& C)
Evaluate training covariance matrix of inputs.
Parameters:
x |
Set of coordinates |
C |
Covariance matrix |
Eigen::VectorXd evaluateTrainingVariance(const Coord& x)
Noise on each assembly row, including virtual and robust geometry tags.
void setSigma2(const double value)
Set sigma2 value.
double getSigma2() const
Get sigma2 value (the per-row noise variance added to the energy diagonal of the training kernel by evaluateTrainingCovarianceMatrix).
void setOptimizeSigma2(bool optimize)
Include log(sigma2) in the shared optimization vector so SCG learns the likelihood noise (Empirical Bayes on the joint [E,F] misfit scale). Off keeps the fixed-sigma2 published behavior.
void setVirtualGeometryNoise(const Coord& geometries, double extra_sigma2)
Register virtual (conditioning-only) geometries whose covariance rows carry extra heteroscedastic noise.
evaluateTrainingCovarianceMatrix matches assembly rows against these geometries by bitwise coordinate equality (both sides are pure copies of the same observation rows), so the tag survives row permutation, tiled layouts, and subset assemblies without index bookkeeping. Assemblies that contain none of the geometries (hyperparameter fitting on real rows only) are untouched. An empty matrix clears the tag.
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 robust-row weights of the Student-t scale mixture, applied as heteroscedastic Gaussian noise. Rows are matched by bitwise coordinate equality, as for the virtual tag. An empty matrix clears the registration.
std::uint64_t geometryNoiseRevision() const
Revision of the virtual and per-geometry noise registrations.
Eigen::VectorXd combineParameters()
Combine parameters of the gaussian likelihood into one Eigen vector.
Empty unless noise learning is enabled; with it, the single entry log(sigma2) appends AFTER the covariance parameters in the shared optimization vector, which is what arms the GP layer’s trailing-noise detection (hasTrailingLikelihoodNoiseParameter).