GPRidge v1.0.0
GPR-accelerated saddle point searches on potential energy surfaces
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
FactorizedLikelihood.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// Copyright (c) gpridge developers
3
// See LICENSE for details.
4
19
20
#ifndef GPR_ML_FACTORIZEDLIKELIHOOD_H_
21
#define GPR_ML_FACTORIZEDLIKELIHOOD_H_
22
23
#include <Eigen/Dense>
24
25
#include "
../../backend/Macros.h
"
26
27
namespace
gpr
{
28
29
class
FactorizedLikelihood
{
30
public
:
38
void
setEigendecomposition
(
const
Eigen::VectorXd& eigenvalues,
39
const
EigenMatrix
& eigenvectors,
40
const
Eigen::VectorXd& targets);
41
50
double
evaluateGP
(
double
noise_variance)
const
;
51
62
double
evaluateTP
(
double
noise_variance,
double
a,
double
b)
const
;
63
70
double
analyticalPrefactor
(
double
noise_variance)
const
;
71
80
double
tpPrefactor
(
double
noise_variance,
double
a,
double
b)
const
;
81
82
Eigen::Index
dataSize
()
const
83
{
84
return
n_;
85
}
86
87
private
:
88
Eigen::VectorXd D_;
// eigenvalues of K_XX
89
Eigen::VectorXd UTY_;
// (U^T y) -- projected targets
90
Eigen::VectorXd UTY2_;
// (U^T y)^2 -- squared projections
91
Eigen::Index n_ = 0;
92
93
// Compute D_n = D + noise and S = sum(UTY^2 / D_n)
94
double
computeS(
double
noise_variance)
const
;
95
};
96
97
}
// namespace gpr
98
99
#endif
// GPR_ML_FACTORIZEDLIKELIHOOD_H_
Macros.h
gpr::FactorizedLikelihood
Definition
FactorizedLikelihood.h:29
gpr::FactorizedLikelihood::evaluateGP
double evaluateGP(double noise_variance) const
GP negative log marginal likelihood at given noise level.
Definition
FactorizedLikelihood.cpp:33
gpr::FactorizedLikelihood::evaluateTP
double evaluateTP(double noise_variance, double a, double b) const
TP negative log marginal likelihood at given noise level.
Definition
FactorizedLikelihood.cpp:57
gpr::FactorizedLikelihood::setEigendecomposition
void setEigendecomposition(const Eigen::VectorXd &eigenvalues, const EigenMatrix &eigenvectors, const Eigen::VectorXd &targets)
Cache the eigendecomposition of K_XX for repeated noise sweeps.
Definition
FactorizedLikelihood.cpp:11
gpr::FactorizedLikelihood::analyticalPrefactor
double analyticalPrefactor(double noise_variance) const
Analytically optimal GP prefactor (signal variance).
Definition
FactorizedLikelihood.cpp:74
gpr::FactorizedLikelihood::tpPrefactor
double tpPrefactor(double noise_variance, double a, double b) const
TP prefactor from inverse-gamma hyperprior.
Definition
FactorizedLikelihood.cpp:80
gpr::FactorizedLikelihood::dataSize
Eigen::Index dataSize() const
Definition
FactorizedLikelihood.h:82
gpr
Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
Definition
Macros.h:16
gpr::EigenMatrix
Eigen::Matrix< double, EigenDynamic, EigenDynamic, EigenMatrixStorage > EigenMatrix
Definition
Macros.h:20
gpr
ml
FactorizedLikelihood.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf