GPRidge v1.0.0
GPR-accelerated saddle point searches on potential energy surfaces
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
LikGaussian.inl
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
// Copyright (c) gpridge developers
3
// See LICENSE for details.
4
5
//
6
// LikGaussian.inl
7
// gpr_dimer
8
//
9
// Created by Maxim Masterov on 21/01/2021.
10
//
11
12
#ifndef LikGaussian_h
13
#define LikGaussian_h
14
15
#include "
../numerics/PortableMath.h
"
16
17
namespace
gpr
{
18
19
inline
void
LikGaussian::setSigma2
(
const
double
value)
20
{
21
sigma2 = value;
22
}
23
24
inline
void
LikGaussian::setPriorParametersGaussian
(
const
PriorBase
& prior)
25
{
26
prior_parameters_gaussian.setParameters(prior);
27
}
28
29
inline
void
LikGaussian::setPriorParametersSqrtt
(
const
PriorBase
& prior)
30
{
31
prior_parameters_sqrtt.setParameters(prior);
32
}
33
34
inline
void
LikGaussian::setParameters
(
const
Eigen::VectorXd&
/*w*/
)
35
{
36
// No-op even when sigma2 is in the optimization set: the GP layer
37
// owns the trailing-noise unpack (setParameters routes exp(w_last)
38
// through trainingToPhysicalNoiseVariance before calling setSigma2),
39
// matching the MATLAB lik_gaussian_unpak split of pak/unpak duties.
40
}
41
50
inline
Eigen::VectorXd
LikGaussian::combineParameters
()
51
{
52
Eigen::VectorXd res;
53
if
(optimize_sigma2_ && std::isfinite(sigma2) && sigma2 > 0.0) {
54
res.resize(1);
55
res(0) =
numerics::log
(sigma2);
56
}
57
return
res;
58
}
59
60
}
/* namespace gpr */
61
62
#endif
/* LikGaussian_h */
PortableMath.h
gpr::LikGaussian::combineParameters
Eigen::VectorXd combineParameters()
Combine parameters of the gaussian likelihood into one Eigen vector.
Definition
LikGaussian.inl:50
gpr::LikGaussian::setPriorParametersSqrtt
void setPriorParametersSqrtt(const PriorBase &prior)
Definition
LikGaussian.inl:29
gpr::LikGaussian::setParameters
void setParameters(const Eigen::VectorXd &w)
Definition
LikGaussian.inl:34
gpr::LikGaussian::setPriorParametersGaussian
void setPriorParametersGaussian(const PriorBase &prior)
Definition
LikGaussian.inl:24
gpr::LikGaussian::setSigma2
void setSigma2(const double value)
Set sigma2 value.
Definition
LikGaussian.inl:19
gpr::PriorBase
Class of prior parameters.
Definition
PriorBase.h:23
gpr::numerics::log
double log(double x) noexcept
Definition
PortableMath.cpp:24
gpr
Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
Definition
Macros.h:16
gpr
observation_models
LikGaussian.inl
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf