class gpr::ConditionalKernelProjection

Overview

A Schur-complement projection at one hyperparameter point. More…

#include <gpr/covariance_functions/ConditionedKernel.h>
 
class ConditionalKernelProjection {
public:
    // structs
 
    struct Factor;
 
    // construction
 
    ConditionalKernelProjection();
    ConditionalKernelProjection(ConditionalKernelProjection&&);
    ~ConditionalKernelProjection();
 
    // methods
 
    ConditionalKernelProjection& operator=(ConditionalKernelProjection&&);
    bool prepare(const Eigen::MatrixXd& joint, Eigen::Index anchor_rows, Eigen::Index query_rows, Eigen::Index dimensions, const Eigen::VectorXd& anchor_noise, Eigen::MatrixXd& covariance, const std::shared_ptr<linalg::DistributedState>& execution = {});
    bool prepare(const Eigen::MatrixXd& joint, const Eigen::MatrixXd& fixed, Eigen::Index anchor_rows, Eigen::Index query_rows, Eigen::Index dimensions, const Eigen::VectorXd& anchor_noise, Eigen::MatrixXd& covariance, const std::shared_ptr<linalg::DistributedState>& execution = {});
    bool prepare(const KernelOperator& kernel, const Coord& anchors, const Coord& query, const Eigen::VectorXd& anchor_noise, Eigen::MatrixXd& covariance, const std::shared_ptr<linalg::DistributedState>& execution = {});
    Eigen::MatrixXd derivative(const Eigen::MatrixXd& matrix) const;
    Eigen::MatrixXd adjoint(const Eigen::MatrixXd& conditional_weight) const;
    Eigen::MatrixXd adjointRows(const Eigen::MatrixXd& conditional_weight, Eigen::Index first, Eigen::Index count) const;
    Eigen::MatrixXd observationLiftRows(Eigen::Index first, Eigen::Index count) const;
    std::shared_ptr<const KernelOperator> intoKernel(std::shared_ptr<const KernelOperator> kernel, Coord anchors);
};

Detailed Documentation

A Schur-complement projection at one hyperparameter point. Parameter derivatives can be consumed in bounded batches using the same weights.

Methods

bool prepare(const Eigen::MatrixXd& joint, const Eigen::MatrixXd& fixed, Eigen::Index anchor_rows, Eigen::Index query_rows, Eigen::Index dimensions, const Eigen::VectorXd& anchor_noise, Eigen::MatrixXd& covariance, const std::shared_ptr<linalg::DistributedState>& execution = {})

Condition the sum of two covariances without storing their joint sum. An empty fixed covariance contributes zero.

bool prepare(const KernelOperator& kernel, const Coord& anchors, const Coord& query, const Eigen::VectorXd& anchor_noise, Eigen::MatrixXd& covariance, const std::shared_ptr<linalg::DistributedState>& execution = {})

Assemble anchor, cross, and query blocks separately. The anchor block becomes the factor storage without retaining a full joint matrix.

Eigen::MatrixXd adjoint(const Eigen::MatrixXd& conditional_weight) const

Frobenius adjoint on symmetric joint covariance perturbations. Applying it once to a likelihood weight avoids a projection per parameter.

Eigen::MatrixXd adjointRows(const Eigen::MatrixXd& conditional_weight, Eigen::Index first, Eigen::Index count) const

Rows of the adjoint for a contiguous range of geometry samples. Each channel contains count rows, while columns retain the full channel-major joint layout. Storage is proportional to count.

Eigen::MatrixXd observationLiftRows(Eigen::Index first, Eigen::Index count) const

Rows of the observation lift T with anchor rows -Caa^-1 Caq and query rows I, so dC = T^T dK T for fixed anchor noise. The requested geometry range appears in each channel; columns are query channels.

std::shared_ptr<const KernelOperator> intoKernel(std::shared_ptr<const KernelOperator> kernel, Coord anchors)

Consume this fitted projection as a rank-local prediction operator. Distributed factors transfer collectively once on their process group. The kernel and anchors must define the joint matrix supplied to prepare.