27#ifndef GPR_ML_GP_DERIVATIVE_SKI_H_
28#define GPR_ML_GP_DERIVATIVE_SKI_H_
58 [[nodiscard]] Eigen::Index
size() const noexcept
62 [[nodiscard]]
double spacing() const noexcept
66 [[nodiscard]]
double at(Eigen::Index i)
const noexcept
68 return origin_ +
static_cast<double>(i) * h_;
71 [[nodiscard]]
double indexOf(
double x)
const noexcept
73 return (
x - origin_) / h_;
82[[nodiscard]] InterpolationWeights
interpolate(
const UniformGrid& grid,
83 const Eigen::VectorXd&
x);
97 DerivativeSKI(
const Eigen::VectorXd&
x,
double lengthscale, Eigen::Index m);
99 [[nodiscard]] Eigen::Index
numPoints() const noexcept
103 [[nodiscard]] Eigen::Index
gridSize() const noexcept
120 const Eigen::VectorXd& v)
const;
125 [[nodiscard]] Eigen::MatrixXd
denseJoint()
const;
129 [[nodiscard]]
static Eigen::MatrixXd
exactJoint(
const Eigen::VectorXd&
x,
139 Eigen::VectorXd kuu_row_;
141 double lengthscale_ = 1.0;
143 Eigen::Index out_of_grid_ = 0;
162[[nodiscard]] Eigen::MatrixXd
lanczosLowRank(
const Eigen::MatrixXd& A,
163 double tol, Eigen::Index max_rank);
168 const Eigen::VectorXd& lengthscales,
169 double tol, Eigen::Index max_rank);
Eigen::VectorXd applyGridKernel(const Eigen::VectorXd &v) const
y = K_UU v, using the Toeplitz structure.
Eigen::Index gridSize() const noexcept
Eigen::Index outOfGrid() const noexcept
static Eigen::MatrixXd exactJoint(const Eigen::VectorXd &x, double lengthscale)
const Eigen::VectorXd & gridKernelRow() const noexcept
First row of the symmetric Toeplitz grid kernel.
double approximationError() const
Relative Frobenius error ||A_ski - A_exact|| / ||A_exact||.
DerivativeSKI(const Eigen::VectorXd &x, double lengthscale, Eigen::Index m)
Eigen::MatrixXd denseJoint() const
Eigen::Index numPoints() const noexcept
double cubicConvolutionWeight(double s) noexcept
DSkipReport dskipProduct(const Eigen::MatrixXd &x, const Eigen::VectorXd &lengthscales, double tol, Eigen::Index max_rank)
Eigen::MatrixXd lanczosLowRank(const Eigen::MatrixXd &A, double tol, Eigen::Index max_rank)
InterpolationWeights interpolate(const UniformGrid &grid, const Eigen::VectorXd &x)
double cubicConvolutionWeightDerivative(double s) noexcept
Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
double relative_error
against the exact product
Eigen::Index exact_rank
numerical rank of the exact matrix
bool rank_bounded
did the rank stay below the matrix size
std::vector< Eigen::Index > rank_after_product
one entry per dimension
Eigen::MatrixXd W
n x m, rows sum to 1 on interior points
Eigen::Index out_of_grid
inputs with no support
Eigen::MatrixXd dW
n x m, d/dx of each row