class gpr::ski::DerivativeSKI

Overview

D-SKI for one dimension of a squared-exponential factor. More…

#include <gpr/ml/gp/DerivativeSKI.h>
 
class DerivativeSKI {
public:
    // construction
 
    DerivativeSKI(const Eigen::VectorXd& x, double lengthscale, Eigen::Index m);
 
    // methods
 
    Eigen::Index numPoints() const;
    Eigen::Index gridSize() const;
    Eigen::Index outOfGrid() const;
    const Eigen::VectorXd& gridKernelRow() const;
    Eigen::VectorXd applyGridKernel(const Eigen::VectorXd& v) const;
    Eigen::MatrixXd denseJoint() const;
    double approximationError() const;
    static Eigen::MatrixXd exactJoint(const Eigen::VectorXd& x, double lengthscale);
};

Detailed Documentation

D-SKI for one dimension of a squared-exponential factor.

k(x,x’) = exp(-(x-x’)^2 / (2 l^2))

Holds W, dW and the grid kernel K_UU. The grid kernel is symmetric Toeplitz (a uniform grid and a stationary kernel), which is what makes the multiply cheap; it is stored by its first row.

Construction

DerivativeSKI(const Eigen::VectorXd& x, double lengthscale, Eigen::Index m)

Build the interpolant for inputs x on a grid of m points. lengthscale must be positive; m must be at least 4 for the cubic stencil to fit. A positive input range needs one interior step, which five points lack.

Methods

const Eigen::VectorXd& gridKernelRow() const

First row of the symmetric Toeplitz grid kernel.

Eigen::VectorXd applyGridKernel(const Eigen::VectorXd& v) const

y = K_UU v, using the Toeplitz structure.

Eigen::MatrixXd denseJoint() const

The 2n x 2n joint value/derivative matrix this interpolant represents. Dense, and only for validation against the exact kernel the point of D-SKI is never to form it.

double approximationError() const

Relative Frobenius error ||A_ski - A_exact|| / ||A_exact||.

static Eigen::MatrixXd exactJoint(const Eigen::VectorXd& x, double lengthscale)

Exact joint value/derivative SE matrix for the same inputs, in the same block layout, so the two can be compared entry for entry.