Matern 3/2 of the Euclidean radius, k(0) = variance.
More...
#include <gpr/bo/StationaryKernel.h>
Matern 3/2 of the Euclidean radius, k(0) = variance.
Definition at line 154 of file StationaryKernel.h.
◆ Matern32()
| gpr::bo::Matern32::Matern32 |
( |
double | variance = 1.0 | ) |
|
|
inlineexplicit |
Definition at line 156 of file StationaryKernel.h.
157 {
158 if (!(variance_ > 0.0) || !std::isfinite(variance_)) {
159 throw std::invalid_argument("signal variance must be positive");
160 }
161 }
double variance() const noexcept
◆ derivative()
| double gpr::bo::Matern32::derivative |
( |
double | squared_distance | ) |
const |
|
inlinenodiscard |
Definition at line 170 of file StationaryKernel.h.
171 {
172 requireNonnegative(squared_distance);
173 return -1.5 * variance_ * std::exp(-std::sqrt(3.0 * squared_distance));
174 }
◆ operator()()
| double gpr::bo::Matern32::operator() |
( |
double | squared_distance | ) |
const |
|
inline |
Definition at line 163 of file StationaryKernel.h.
164 {
165 const double radius = std::sqrt(std::max(0.0, squared_distance));
166 const double scaled = std::sqrt(3.0) * radius;
167 return variance_ * (1.0 + scaled) * std::exp(-scaled);
168 }
◆ secondDerivative()
| double gpr::bo::Matern32::secondDerivative |
( |
double | squared_distance | ) |
const |
|
inlinenodiscard |
Definition at line 176 of file StationaryKernel.h.
177 {
178 requireNonnegative(squared_distance);
179 if (squared_distance == 0.0) {
180 return std::numeric_limits<double>::infinity();
181 }
182 return 0.75 * std::sqrt(3.0 / squared_distance) * variance_ *
183 std::exp(-std::sqrt(3.0 * squared_distance));
184 }
◆ variance()
| double gpr::bo::Matern32::variance |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
The documentation for this class was generated from the following file: