Matern 5/2 of the Euclidean radius, k(0) = variance.
More...
#include <gpr/bo/StationaryKernel.h>
Matern 5/2 of the Euclidean radius, k(0) = variance.
Definition at line 204 of file StationaryKernel.h.
◆ Matern52()
| gpr::bo::Matern52::Matern52 |
( |
double | variance = 1.0 | ) |
|
|
inlineexplicit |
Definition at line 206 of file StationaryKernel.h.
207 {
208 if (!(variance_ > 0.0) || !std::isfinite(variance_)) {
209 throw std::invalid_argument("signal variance must be positive");
210 }
211 }
double variance() const noexcept
◆ derivative()
| double gpr::bo::Matern52::derivative |
( |
double | squared_distance | ) |
const |
|
inlinenodiscard |
Right-hand derivative on a nonnegative squared distance. At zero the value is the limit, not a clamp of operator().
Definition at line 224 of file StationaryKernel.h.
225 {
226 requireNonnegative(squared_distance);
227 const double radius = std::sqrt(squared_distance);
228 const double root_five = std::sqrt(5.0);
229 return variance_ * (-5.0 / 6.0) * (1.0 + root_five * radius) *
230 std::exp(-root_five * radius);
231 }
◆ operator()()
| double gpr::bo::Matern52::operator() |
( |
double | squared_distance | ) |
const |
|
inline |
Definition at line 213 of file StationaryKernel.h.
214 {
215 const double radius = std::sqrt(std::max(0.0, squared_distance));
216 const double root_five = std::sqrt(5.0);
217 const double polynomial =
218 1.0 + root_five * radius + (5.0 / 3.0) * squared_distance;
219 return variance_ * polynomial * std::exp(-root_five * radius);
220 }
◆ secondDerivative()
| double gpr::bo::Matern52::secondDerivative |
( |
double | squared_distance | ) |
const |
|
inlinenodiscard |
Definition at line 233 of file StationaryKernel.h.
234 {
235 requireNonnegative(squared_distance);
236 const double radius = std::sqrt(squared_distance);
237 return variance_ * (25.0 / 12.0) * std::exp(-std::sqrt(5.0) * radius);
238 }
◆ variance()
| double gpr::bo::Matern52::variance |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
The documentation for this class was generated from the following file: