.. index:: pair: class; gpr::ConditionalKernelProjection .. _doxid-classgpr_1_1_conditional_kernel_projection: class gpr::ConditionalKernelProjection ====================================== .. toctree:: :hidden: struct_gpr_ConditionalKernelProjection_Factor.rst Overview ~~~~~~~~ A Schur-complement projection at one hyperparameter point. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class ConditionalKernelProjection { public: // structs struct :ref:`Factor`; // construction :target:`ConditionalKernelProjection`(); :target:`ConditionalKernelProjection`(ConditionalKernelProjection&&); :target:`~ConditionalKernelProjection`(); // methods :ref:`ConditionalKernelProjection`& :target:`operator=`(:ref:`ConditionalKernelProjection`&&); bool :target:`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<:ref:`linalg::DistributedState`>& execution = {}); bool :ref:`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<:ref:`linalg::DistributedState`>& execution = {}); bool :ref:`prepare`(const :ref:`KernelOperator`& kernel, const :ref:`Coord`& anchors, const :ref:`Coord`& query, const Eigen::VectorXd& anchor_noise, Eigen::MatrixXd& covariance, const std::shared_ptr<:ref:`linalg::DistributedState`>& execution = {}); Eigen::MatrixXd :target:`derivative`(const Eigen::MatrixXd& matrix) const; Eigen::MatrixXd :ref:`adjoint`(const Eigen::MatrixXd& conditional_weight) const; Eigen::MatrixXd :ref:`adjointRows`(const Eigen::MatrixXd& conditional_weight, Eigen::Index first, Eigen::Index count) const; Eigen::MatrixXd :ref:`observationLiftRows`(Eigen::Index first, Eigen::Index count) const; std::shared_ptr`> :ref:`intoKernel`(std::shared_ptr`> kernel, :ref:`Coord` anchors); }; .. _details-classgpr_1_1_conditional_kernel_projection: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A Schur-complement projection at one hyperparameter point. Parameter derivatives can be consumed in bounded batches using the same weights. Methods ------- .. index:: pair: function; prepare .. _doxid-classgpr_1_1_conditional_kernel_projection_1a2a1a7a66b5dd91539585b7d52d141b90: .. ref-code-block:: cpp :class: doxyrest-title-code-block 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<:ref:`linalg::DistributedState`>& execution = {}) Condition the sum of two covariances without storing their joint sum. An empty fixed covariance contributes zero. .. index:: pair: function; prepare .. _doxid-classgpr_1_1_conditional_kernel_projection_1a1065839031c6dab1808c6d058f7ffe87: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool prepare(const :ref:`KernelOperator`& kernel, const :ref:`Coord`& anchors, const :ref:`Coord`& query, const Eigen::VectorXd& anchor_noise, Eigen::MatrixXd& covariance, const std::shared_ptr<:ref:`linalg::DistributedState`>& execution = {}) Assemble anchor, cross, and query blocks separately. The anchor block becomes the factor storage without retaining a full joint matrix. .. index:: pair: function; adjoint .. _doxid-classgpr_1_1_conditional_kernel_projection_1a2a2aeb2707523761be01bed205a0ff89: .. ref-code-block:: cpp :class: doxyrest-title-code-block 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. .. index:: pair: function; adjointRows .. _doxid-classgpr_1_1_conditional_kernel_projection_1a6aa4dc4b248736d172af9e643af2d37f: .. ref-code-block:: cpp :class: doxyrest-title-code-block 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. .. index:: pair: function; observationLiftRows .. _doxid-classgpr_1_1_conditional_kernel_projection_1a82317d5b79d6c61c84947369791d812a: .. ref-code-block:: cpp :class: doxyrest-title-code-block 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. .. index:: pair: function; intoKernel .. _doxid-classgpr_1_1_conditional_kernel_projection_1ab1fd2e2be91fa327c612a27df097d4dd: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::shared_ptr`> intoKernel(std::shared_ptr`> kernel, :ref:`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.