#include <gpr/ml/gp/StableBasis.h>
Classes | |
| struct | SchurFloorReport |
| What floorCertifiedSchurDiagonal did to a diagonal. More... | |
| struct | BorderedFactorCache |
| struct | BorderedRmCache |
Public Member Functions | |
| StableBasisND () | |
| StableBasisND (std::shared_ptr< linalg::BackendContext > context) | |
| void | setChopNoiseVariance (double sigma2) noexcept |
| double | chopNoiseVariance () const noexcept |
| double | droppedEigenvalueMax () const noexcept |
| Largest eigenvalue discarded by the last truncation (0 when none). | |
| double | covarianceComplementEigenvalue () const noexcept |
| Largest signal eigenvalue represented by the discarded covariance complement. | |
| double | complementWeight (double sigma2) const noexcept |
| double | covarianceComplementWeight (double sigma2) const noexcept |
| void | recordDroppedSpectrum (const Eigen::VectorXd &S) |
| void | factorize (const Eigen::MatrixXd &X, const Eigen::VectorXd &eps, double alpha, int max_degree, bool gradient_enhanced, double sv_rtol=1e-13) |
| void | factorizeGPCartesian (const Eigen::MatrixXd &X, const Eigen::VectorXd &eps, double alpha, double overall_scale, int max_degree, const std::vector< Eigen::MatrixXd > &jacobians, bool component_major=false, double sv_rtol=1e-13, int sketch_size=0, int n_power_iter=2, double mode_prune_rtol=0.0, double sv_abs_tol=0.0) |
| void | factorizeGPCartesianAffine (const Eigen::MatrixXd &U, const Eigen::VectorXd &eps, double alpha, double overall_scale, int max_degree, const std::vector< Eigen::MatrixXd > &jac_tangent, const std::vector< Eigen::MatrixXd > &jac_normal, bool component_major=false, double sv_rtol=1e-13, int sketch_size=0, int n_power_iter=2, double mode_prune_rtol=0.0, double sv_abs_tol=0.0) |
| void | factorizeKernel (const Eigen::MatrixXd &kernel, double sv_rtol=1e-13, double sv_abs_tol=0.0, double sv_chop_tol=0.0) |
| bool | factorizeKernelLapackRrr (const Eigen::MatrixXd &kernel, double sv_rtol=1e-13, double sv_abs_tol=0.0, double sv_chop_tol=0.0, bool allow_value_range=false) |
| void | factorizeNoisyKernel (const Eigen::MatrixXd &noisy_kernel, double sigma2) |
| bool | factorizeNoisyKernelLapackRrr (const Eigen::MatrixXd &noisy_kernel, double sigma2) |
| void | factorizeKernelRandomized (const Eigen::MatrixXd &kernel, int sketch_size, int n_power_iter=2, double sv_rtol=1e-13, double sv_abs_tol=0.0, double sv_chop_tol=0.0) |
| void | liftFromDeflatedSubspace (Eigen::Index full_rows, Eigen::MatrixXd lifted_psi, const detail::RigidDeflationState &deflation, double extra_assembly_error=0.0) |
| bool | factorizeKernelAppend (const StableBasisND &old_basis, const Eigen::MatrixXd &cross_old_new, const Eigen::MatrixXd &new_kernel, double sv_rtol=1e-13, double sv_abs_tol=0.0, double sv_chop_tol=0.0) |
| Eigen::VectorXd | solve (const Eigen::VectorXd &y) const |
| Eigen::VectorXd | predictEnergy (const Eigen::MatrixXd &Xstar, const Eigen::VectorXd &b) const |
| Eigen::MatrixXd | predictGradient (const Eigen::MatrixXd &Xstar, const Eigen::VectorXd &b) const |
| Eigen::VectorXd | solveNoisy (const Eigen::VectorXd &y, double sigma2) const |
| Eigen::VectorXd | noisySelfQuadratic (const Eigen::MatrixXd &rhs, double sigma2) const |
| Eigen::VectorXd | noisyRangeSelfQuadratic (const Eigen::MatrixXd &rhs, double sigma2) const |
| Eigen::VectorXd | stableRangePosteriorDiagonal (const Eigen::MatrixXd &rhs, const Eigen::VectorXd &prior, const Eigen::VectorXd &signal, double sigma2, bool check_variance=true) const |
| Range-only posterior diagonal as a nonnegative eigenmode sum. | |
| std::vector< BorderedVarianceInterval > | noisyBorderedVarianceIntervals (const Eigen::MatrixXd &rhs, const Eigen::VectorXd &prior_diag, double sigma2) const |
| std::vector< BorderedVarianceInterval > | noisyBorderedVarianceIntervals (const Eigen::MatrixXd &rhs, const Eigen::VectorXd &prior_diag, double sigma2, BorderedSchurSign sign) const |
| Same enclosure. PreserveSigned keeps a negative Schur value. | |
| BorderedNoiseReport | borderedNoiseReport (double sigma2) const |
| BorderedNoiseReport | borderedNoiseReport (double sigma2, double output_variance_scale) const |
| BorderedNoiseReport | borderedNoiseReport (double sigma2, double y_scale, double calibration) const |
| SchurFloorReport | floorCertifiedSchurDiagonal (const Eigen::MatrixXd &cross, const Eigen::VectorXd &prior, double sigma2, Eigen::VectorXd &value, const std::vector< char > *skip=nullptr) const |
| double | trainingRowLatentErrorBound (Eigen::Index row, double sigma2) const |
| Eigen::Index | borderedKernelOrder () const noexcept |
| bool | supportsBorderedVarianceInterval () const noexcept |
| Eigen::VectorXd | noisyInverseDiagonal (double sigma2) const |
| Eigen::VectorXd | noisyInverseDiagonalEntries (const Eigen::VectorXi &rows, double sigma2) const |
| double | leaveOneOutNegativeLogPredictiveDensity (const Eigen::VectorXd &y, double sigma2) const |
| double | computeVarianceCalibrationFactor (const Eigen::VectorXd &y, double sigma2) const |
| Eigen::VectorXd | noisyInverseSandwichDiagonal (const Eigen::MatrixXd &dK, double sigma2) const |
| double | leaveOneOutNegativeLogPredictiveDensityDirectionalDerivative (const Eigen::VectorXd &y, double sigma2, const Eigen::MatrixXd &dK) const |
| Eigen::MatrixXd | noisyInverse (double sigma2) const |
| double | leaveOneOutNegativeLogPredictiveDensityGrouped (const Eigen::VectorXd &y, double sigma2, const std::vector< std::vector< Eigen::Index > > &groups) const |
| double | leaveOneOutNegativeLogPredictiveDensityGroupedDirectionalDerivative (const Eigen::VectorXd &y, double sigma2, const Eigen::MatrixXd &dK, const std::vector< std::vector< Eigen::Index > > &groups) const |
| Eigen::VectorXd | posteriorMeanReducedCoeffs (const Eigen::VectorXd &y, double sigma2) const |
| StableBasisPosteriorWeights | noisyPosteriorWeights (const Eigen::VectorXd &y, double sigma2) const |
| double | logDetNoisy (double sigma2) const |
| Eigen::VectorXd | posteriorMeanWeights (const Eigen::VectorXd &alpha) const |
| Eigen::VectorXd | posteriorMeanEnergy (const Eigen::MatrixXd &Xstar, const Eigen::VectorXd &alpha) const |
| Eigen::MatrixXd | posteriorMeanGradient (const Eigen::MatrixXd &Xstar, const Eigen::VectorXd &alpha) const |
| Eigen::VectorXd | posteriorVarianceEnergy (const Eigen::MatrixXd &Xstar, double sigma2) const |
| Eigen::VectorXd | posteriorVarianceDiagonal (const Eigen::MatrixXd &cross, const Eigen::VectorXd &prior, double sigma2) const |
| Cancellation-free posterior diagonal for arbitrary query channels. | |
| Eigen::MatrixXd | posteriorCovariance (const Eigen::MatrixXd &cross, const Eigen::MatrixXd &prior, double sigma2) const |
| Joint posterior covariance from the same exact eigenmode sums. | |
| double | posteriorVarianceAction (const Eigen::MatrixXd &cross, const Eigen::MatrixXd &prior, const Eigen::VectorXd &weights, double sigma2) const |
| Variance of a linear action on a joint query covariance, evaluated by the same nonnegative eigenmode decomposition. | |
| Eigen::VectorXd | predictEnergyAffine (const Eigen::MatrixXd &Ustar, const Eigen::MatrixXd &residuals, const Eigen::VectorXd &b) const |
| Eigen::VectorXd | energyAffineDesignRow (const Eigen::MatrixXd &Ustar, const Eigen::MatrixXd &residuals) const |
| Eigen::MatrixXd | predictGradientAffine (const Eigen::MatrixXd &Ustar, const Eigen::MatrixXd &residuals, const Eigen::MatrixXd &basis, const Eigen::VectorXd &b) const |
| Eigen::MatrixXd | predictGradientHessianVectorAffine (const Eigen::MatrixXd &Ustar, const Eigen::MatrixXd &residuals, const Eigen::MatrixXd &basis, const Eigen::MatrixXd &tangent_directions, const Eigen::MatrixXd &residual_directions, const Eigen::VectorXd &b) const |
| Eigen::VectorXd | posteriorVarianceEnergyAffine (const Eigen::MatrixXd &Ustar, const Eigen::MatrixXd &residuals, double sigma2) const |
| double | conditionNumber () const |
| double | conditionFlooredNoise (double sigma2) const |
| double | varianceFlooredNoise (double sigma2) const |
| Variance-specific likelihood-noise floor for the retained spectrum. | |
| int | rank () const |
| bool | usedLapackRrrValueRange () const noexcept |
| const char * | lastKernelFactorizeDriver () const noexcept |
| int | lapackRrrFullSolvesForTesting () const noexcept |
| int | lapackRrrExtensionsForTesting () const noexcept |
| bool | usedLapackRrrValueRangeForTesting () const noexcept |
| bool | usedFastKernelEigensolverForTesting () const noexcept |
| int | borderedFactorBuildsForTesting () const noexcept |
| void | assumeExtendedCertificationForTesting (bool available) |
| void | setRetainedSpectrumForTesting (Eigen::MatrixXd psi, Eigen::VectorXd singular_values) |
| Eigen::MatrixXd | energyDesignForTesting (const Eigen::MatrixXd &Xstar) const |
| Eigen::MatrixXd | affineEnergyDesignForTesting (const Eigen::MatrixXd &Ustar, const Eigen::MatrixXd &residuals, Eigen::VectorXd &kself) const |
| Eigen::VectorXd | rangeVarianceFromDesignForTesting (const Eigen::MatrixXd &A_E, double sigma2) const |
| const Eigen::MatrixXd & | trainingDesignForTesting () const |
| void | borderedEpsKForTesting (double &hi, double &lo, int &operations) const |
| const Eigen::MatrixXd & | borderedKernelForTesting () const |
| double | borderedAssemblyErrorForTesting () const |
| bool | hasCrossCovariance () const |
| int | numBasis () const |
| Eigen::Index | numObs () const |
| const Eigen::MatrixXd & | leftSingularVectors () const |
| const Eigen::VectorXd & | singularValues () const |
| const Eigen::VectorXd & | noisyEigenvalues () const |
| bool | hasNoisyEigenvalues () const |
| bool | permuteObservationRows (const Eigen::VectorXi &source_for_target) |
| Eigen::MatrixXd | reconstructKernel (bool truncated) const |
| void | eigenTensorEpsDerivative (const Eigen::MatrixXd &X, int j, Eigen::MatrixXd &Phi, Eigen::MatrixXd &dPhi_eps) const |
Static Public Member Functions | |
| static std::size_t | factorizationCount () noexcept |
| static SchurFloorReport | schurFloorTotals () noexcept |
| Process-wide totals of SchurFloorReport over every call. | |
| static void | resetSchurFloorTotals () noexcept |
| static double | floorLatentVariance (double latent, double error_bound, SchurFloorReport *report) noexcept |
| static Eigen::Index | standardChop (const Eigen::VectorXd &coeffs, double tol) |
| static int | autoMaxDegree (const Eigen::VectorXd &eps, double alpha, int dim, double target_tol, int max_degree_cap=40) |
| static bool | gradedModeCountExceedsLimit (int dim, int max_degree, Eigen::Index limit) |
| static int | capMaxDegreeByModeCount (int dim, int requested_degree, Eigen::Index mode_limit) |
| static Eigen::MatrixXd | affineSpanBasis (const Eigen::MatrixXd ¢ered_X) |
| static void | projectToAffineSpan (const Eigen::MatrixXd ¢ered_X, const Eigen::MatrixXd &basis, Eigen::MatrixXd &coords, Eigen::MatrixXd &residuals) |
| static double | conditionFlooredSigma2ForTesting (const Eigen::VectorXd &singular_values, double sigma2, Eigen::Index nobs) |
| static int | designVarianceWorkingDigitsForTesting () noexcept |
| static long long | latentVarianceOperationDepthForTesting (Eigen::Index rank) noexcept |
Definition at line 195 of file StableBasis.h.
| gpr::StableBasisND::StableBasisND | ( | ) |
Definition at line 629 of file StableBasis.cpp.
|
explicit |
Definition at line 634 of file StableBasis.cpp.
|
inline |
Definition at line 891 of file StableBasis.h.
|
static |
Definition at line 1823 of file StableBasis.cpp.
| void gpr::StableBasisND::assumeExtendedCertificationForTesting | ( | bool | available | ) |
Force the extended-precision certificate off, or back on. On cannot succeed where the platform has neither an extended long double nor IEEE binary64 for the double-double fallback. Clears the factor cache.
Definition at line 3231 of file StableBasis.cpp.
|
static |
Definition at line 931 of file StableBasis.cpp.
|
inlinenodiscard |
Definition at line 929 of file StableBasis.h.
| void gpr::StableBasisND::borderedEpsKForTesting | ( | double & | hi, |
| double & | lo, | ||
| int & | operations ) const |
The bordered factor's eps_K as hi + lo binary64 limbs, and the number of rounded operations the directed margin on it counts.
Definition at line 4811 of file StableBasis.cpp.
|
inlinenodiscardnoexcept |
Definition at line 854 of file StableBasis.h.
|
inlinenodiscard |
The exact stored kernel and its binary64 assembly error bound, the two inputs eps_K is derived from.
Definition at line 925 of file StableBasis.h.
|
inlinenodiscardnoexcept |
Definition at line 607 of file StableBasis.h.
| BorderedNoiseReport gpr::StableBasisND::borderedNoiseReport | ( | double | sigma2 | ) | const |
Condition-floored noise for the requested sigma2, the certificate gap of the stored kernel factor and the noise the interval certifies. Builds (and caches) the factor, and throws BorderedVarianceError when it cannot be built.
Definition at line 3631 of file StableBasis.cpp.
| BorderedNoiseReport gpr::StableBasisND::borderedNoiseReport | ( | double | sigma2, |
| double | output_variance_scale ) const |
The same report in the units of an output frame scaled by output_variance_scale (a positive finite factor, y_scale^2). The certificate is decided after scaling, from the scaled endpoints: floored is rounded down and certificate_gap up to binary64, so certified holds exactly when the reported floored exceeds the reported gap. A unit gap that survives in training units can collapse under the multiply and is then not certified. requested is rounded down like floored, so floored >= requested still holds, and interval equals floored.
Definition at line 3636 of file StableBasis.cpp.
| BorderedNoiseReport gpr::StableBasisND::borderedNoiseReport | ( | double | sigma2, |
| double | y_scale, | ||
| double | calibration ) const |
The same report for the output frame y_scale^2 * calibration, with the scale kept in the working type: it is the outward-rounded enclosure [lower, upper] of y_scale^2 * calibration (varianceScaleEnclosure), not a binary64 y_scale * y_scale. floored and requested are rounded down through lower, certificate_gap up through upper, so the certificate is the strict comparison of the reported endpoints and agrees with the energy variance interval gate. Throws BorderedVarianceError when the enclosure is not positive and finite.
Definition at line 3671 of file StableBasis.cpp.
|
static |
Definition at line 978 of file StableBasis.cpp.
|
inlinenodiscardnoexcept |
Definition at line 206 of file StableBasis.h.
|
inlinenodiscardnoexcept |
Weight of the complement (I - Psi Psi^T) in (K + sigma2 I)^-1: 1/(dropped_s2_max + sigma2), the lower end of the exact range.
Definition at line 226 of file StableBasis.h.
| double gpr::StableBasisND::computeVarianceCalibrationFactor | ( | const Eigen::VectorXd & | y, |
| double | sigma2 ) const |
Definition at line 4050 of file StableBasis.cpp.
|
nodiscard |
Condition-floored likelihood noise for this basis' retained spectrum: the same floor every mean/logdet/LOO/variance path applies, exposed so external covariance assembly inverts the SAME regularized operator.
Definition at line 3032 of file StableBasis.cpp.
|
staticnodiscard |
The condition floor of a descending singular spectrum, as conditionFlooredNoise computes it from the retained one.
Definition at line 3042 of file StableBasis.cpp.
| double gpr::StableBasisND::conditionNumber | ( | ) | const |
Definition at line 4717 of file StableBasis.cpp.
|
inlinenodiscardnoexcept |
Largest signal eigenvalue represented by the discarded covariance complement.
A complement below the eigensolver's backward-error threshold is the null space of the retained model and therefore has eigenvalue zero.
Definition at line 220 of file StableBasis.h.
|
inlinenodiscardnoexcept |
Complement weight for posterior covariance: 1/(max(dropped_s2_max, n eps s2_max) + sigma2).
A dropped eigenvalue below the resolution n eps s2_max is recorded as zero, so complementWeight gives it 1/sigma2. That overshoots its exact weight 1/(s2 + sigma2) by s2/sigma2 relative, which is O(1) once sigma2 sits at the condition floor (itself ~ n eps s2_max). A joint covariance K - K* W K* with W above (K + sigma2 I)^-1 in any direction is indefinite, and the training-row identity sigma2 I - sigma2^2 W pairs a zero complement variance with a nonzero mixed entry. Bounding the dropped spectrum by the resolution keeps W <= (K + sigma2 I)^-1: every covariance block then conditions the prior Psi S^2 Psi^T + (1/w_c - sigma2)(I - Psi Psi^T) >= K on the same observations. The bound is fixed by the factorization, not by the eigensolver's rounding, so it does not move between evaluations.
Definition at line 258 of file StableBasis.h.
|
staticnodiscardnoexcept |
Significand digits of the working type the design-variance accumulation runs in.
Definition at line 4800 of file StableBasis.cpp.
|
inlinenodiscardnoexcept |
Largest eigenvalue discarded by the last truncation (0 when none).
Definition at line 211 of file StableBasis.h.
| void gpr::StableBasisND::eigenTensorEpsDerivative | ( | const Eigen::MatrixXd & | X, |
| int | j, | ||
| Eigen::MatrixXd & | Phi, | ||
| Eigen::MatrixXd & | dPhi_eps ) const |
Definition at line 1974 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::energyAffineDesignRow | ( | const Eigen::MatrixXd & | Ustar, |
| const Eigen::MatrixXd & | residuals ) const |
Definition at line 2654 of file StableBasis.cpp.
|
inline |
Definition at line 884 of file StableBasis.h.
|
staticnoexcept |
Process-wide count of kernel eigenfactorizations (full and append), the O(m^3) operations of this backend; read per outer iteration by the driver's report line.
Definition at line 992 of file StableBasis.cpp.
| void gpr::StableBasisND::factorize | ( | const Eigen::MatrixXd & | X, |
| const Eigen::VectorXd & | eps, | ||
| double | alpha, | ||
| int | max_degree, | ||
| bool | gradient_enhanced, | ||
| double | sv_rtol = 1e-13 ) |
Definition at line 2083 of file StableBasis.cpp.
| void gpr::StableBasisND::factorizeGPCartesian | ( | const Eigen::MatrixXd & | X, |
| const Eigen::VectorXd & | eps, | ||
| double | alpha, | ||
| double | overall_scale, | ||
| int | max_degree, | ||
| const std::vector< Eigen::MatrixXd > & | jacobians, | ||
| bool | component_major = false, | ||
| double | sv_rtol = 1e-13, | ||
| int | sketch_size = 0, | ||
| int | n_power_iter = 2, | ||
| double | mode_prune_rtol = 0.0, | ||
| double | sv_abs_tol = 0.0 ) |
Definition at line 2181 of file StableBasis.cpp.
| void gpr::StableBasisND::factorizeGPCartesianAffine | ( | const Eigen::MatrixXd & | U, |
| const Eigen::VectorXd & | eps, | ||
| double | alpha, | ||
| double | overall_scale, | ||
| int | max_degree, | ||
| const std::vector< Eigen::MatrixXd > & | jac_tangent, | ||
| const std::vector< Eigen::MatrixXd > & | jac_normal, | ||
| bool | component_major = false, | ||
| double | sv_rtol = 1e-13, | ||
| int | sketch_size = 0, | ||
| int | n_power_iter = 2, | ||
| double | mode_prune_rtol = 0.0, | ||
| double | sv_abs_tol = 0.0 ) |
Definition at line 2287 of file StableBasis.cpp.
| void gpr::StableBasisND::factorizeKernel | ( | const Eigen::MatrixXd & | kernel, |
| double | sv_rtol = 1e-13, | ||
| double | sv_abs_tol = 0.0, | ||
| double | sv_chop_tol = 0.0 ) |
Definition at line 1023 of file StableBasis.cpp.
| bool gpr::StableBasisND::factorizeKernelAppend | ( | const StableBasisND & | old_basis, |
| const Eigen::MatrixXd & | cross_old_new, | ||
| const Eigen::MatrixXd & | new_kernel, | ||
| double | sv_rtol = 1e-13, | ||
| double | sv_abs_tol = 0.0, | ||
| double | sv_chop_tol = 0.0 ) |
Definition at line 1588 of file StableBasis.cpp.
| bool gpr::StableBasisND::factorizeKernelLapackRrr | ( | const Eigen::MatrixXd & | kernel, |
| double | sv_rtol = 1e-13, | ||
| double | sv_abs_tol = 0.0, | ||
| double | sv_chop_tol = 0.0, | ||
| bool | allow_value_range = false ) |
Definition at line 1206 of file StableBasis.cpp.
| void gpr::StableBasisND::factorizeKernelRandomized | ( | const Eigen::MatrixXd & | kernel, |
| int | sketch_size, | ||
| int | n_power_iter = 2, | ||
| double | sv_rtol = 1e-13, | ||
| double | sv_abs_tol = 0.0, | ||
| double | sv_chop_tol = 0.0 ) |
Definition at line 1466 of file StableBasis.cpp.
| void gpr::StableBasisND::factorizeNoisyKernel | ( | const Eigen::MatrixXd & | noisy_kernel, |
| double | sigma2 ) |
Definition at line 1360 of file StableBasis.cpp.
| bool gpr::StableBasisND::factorizeNoisyKernelLapackRrr | ( | const Eigen::MatrixXd & | noisy_kernel, |
| double | sigma2 ) |
Definition at line 1416 of file StableBasis.cpp.
| StableBasisND::SchurFloorReport gpr::StableBasisND::floorCertifiedSchurDiagonal | ( | const Eigen::MatrixXd & | cross, |
| const Eigen::VectorXd & | prior, | ||
| double | sigma2, | ||
| Eigen::VectorXd & | value, | ||
| const std::vector< char > * | skip = nullptr ) const |
value(j) is a computed Schur diagonal prior(j) - cross_j^T (K + sigma2 I)^(-1) cross_j. Nonnegative entries are untouched; no entry is left negative or NaN. A negative entry is replaced by the smallest nonnegative value of the outward-rounded bordered enclosure of that same quantity: 0 where the enclosure contains zero (lower <= 0 <= upper, counted as floored), and the lower endpoint where it is entirely positive (counted as raised). Where the enclosure is entirely negative the entry becomes +inf and counts as proven negative. A NaN or -inf entry, and a negative one without an enclosure, becomes +inf and counts as uncertified. skip, when given, has one flag per entry. A flagged entry has already been replaced by another certified formula (the latent training-row variance), so it is neither floored nor counted: the counts describe the entries that remain in value.
Definition at line 4842 of file StableBasis.cpp.
|
staticnoexcept |
Floors a computed latent variance. A nonnegative value, +inf included, is returned as is. A negative value whose error bound reaches 0 is roundoff and becomes 0. One whose bound stays negative is proven negative and becomes +inf. A NaN or -inf value, or a negative one whose bound is NaN, infinite or negative, has no certificate: it becomes +inf and counts as uncertified.
Definition at line 4964 of file StableBasis.cpp.
|
static |
Definition at line 960 of file StableBasis.cpp.
|
inline |
Definition at line 936 of file StableBasis.h.
|
inline |
Definition at line 964 of file StableBasis.h.
|
inlinenodiscardnoexcept |
Definition at line 842 of file StableBasis.h.
|
inlinenodiscardnoexcept |
Full DSYEVR calls. A repeated kernel and a bordered extension of a cached spectrum do not increment this.
Definition at line 838 of file StableBasis.h.
|
inlinenodiscardnoexcept |
Definition at line 832 of file StableBasis.h.
|
staticnodiscardnoexcept |
Operations a term of the training-row latent variance passes through, which trainingRowLatentErrorBound scales the unit roundoff by.
Definition at line 4794 of file StableBasis.cpp.
| double gpr::StableBasisND::leaveOneOutNegativeLogPredictiveDensity | ( | const Eigen::VectorXd & | y, |
| double | sigma2 ) const |
Definition at line 3974 of file StableBasis.cpp.
| double gpr::StableBasisND::leaveOneOutNegativeLogPredictiveDensityDirectionalDerivative | ( | const Eigen::VectorXd & | y, |
| double | sigma2, | ||
| const Eigen::MatrixXd & | dK ) const |
Definition at line 4106 of file StableBasis.cpp.
| double gpr::StableBasisND::leaveOneOutNegativeLogPredictiveDensityGrouped | ( | const Eigen::VectorXd & | y, |
| double | sigma2, | ||
| const std::vector< std::vector< Eigen::Index > > & | groups ) const |
Definition at line 4156 of file StableBasis.cpp.
| double gpr::StableBasisND::leaveOneOutNegativeLogPredictiveDensityGroupedDirectionalDerivative | ( | const Eigen::VectorXd & | y, |
| double | sigma2, | ||
| const Eigen::MatrixXd & | dK, | ||
| const std::vector< std::vector< Eigen::Index > > & | groups ) const |
Definition at line 4223 of file StableBasis.cpp.
|
inline |
Definition at line 950 of file StableBasis.h.
| void gpr::StableBasisND::liftFromDeflatedSubspace | ( | Eigen::Index | full_rows, |
| Eigen::MatrixXd | lifted_psi, | ||
| const detail::RigidDeflationState & | deflation, | ||
| double | extra_assembly_error = 0.0 ) |
Definition at line 1564 of file StableBasis.cpp.
| double gpr::StableBasisND::logDetNoisy | ( | double | sigma2 | ) | const |
Definition at line 4317 of file StableBasis.cpp.
| std::vector< BorderedVarianceInterval > gpr::StableBasisND::noisyBorderedVarianceIntervals | ( | const Eigen::MatrixXd & | rhs, |
| const Eigen::VectorXd & | prior_diag, | ||
| double | sigma2 ) const |
Two-sided variational Schur variance intervals [lower, upper] for s_j = prior_diag(j) - rhs_j^T (K + sigma2 I)^(-1) rhs_j. Requires a stored kernel and a strictly positive certified minimum eigenvalue mu_min of M = K + sigma2 I at the condition-floored noise. The default entry point clamps a negative lower endpoint to zero when the upper endpoint is nonnegative and throws std::runtime_error when the upper endpoint is negative or M cannot be certified. sigma2 is floored through conditionFlooredNoise, the noise the mean, log-determinant and LOO routes invert, so M is the matrix the trained factor used. Endpoints are rounded outward to binary64.
Definition at line 3701 of file StableBasis.cpp.
| std::vector< BorderedVarianceInterval > gpr::StableBasisND::noisyBorderedVarianceIntervals | ( | const Eigen::MatrixXd & | rhs, |
| const Eigen::VectorXd & | prior_diag, | ||
| double | sigma2, | ||
| BorderedSchurSign | sign ) const |
Same enclosure. PreserveSigned keeps a negative Schur value.
Definition at line 3710 of file StableBasis.cpp.
|
inline |
Definition at line 960 of file StableBasis.h.
| Eigen::MatrixXd gpr::StableBasisND::noisyInverse | ( | double | sigma2 | ) | const |
Definition at line 4137 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::noisyInverseDiagonal | ( | double | sigma2 | ) | const |
Definition at line 3913 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::noisyInverseDiagonalEntries | ( | const Eigen::VectorXi & | rows, |
| double | sigma2 ) const |
Definition at line 3941 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::noisyInverseSandwichDiagonal | ( | const Eigen::MatrixXd & | dK, |
| double | sigma2 ) const |
Definition at line 4059 of file StableBasis.cpp.
| StableBasisPosteriorWeights gpr::StableBasisND::noisyPosteriorWeights | ( | const Eigen::VectorXd & | y, |
| double | sigma2 ) const |
Definition at line 3048 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::noisyRangeSelfQuadratic | ( | const Eigen::MatrixXd & | rhs, |
| double | sigma2 ) const |
Definition at line 3125 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::noisySelfQuadratic | ( | const Eigen::MatrixXd & | rhs, |
| double | sigma2 ) const |
Definition at line 3100 of file StableBasis.cpp.
|
inline |
Definition at line 940 of file StableBasis.h.
|
inline |
Definition at line 946 of file StableBasis.h.
| bool gpr::StableBasisND::permuteObservationRows | ( | const Eigen::VectorXi & | source_for_target | ) |
Definition at line 1782 of file StableBasis.cpp.
| Eigen::MatrixXd gpr::StableBasisND::posteriorCovariance | ( | const Eigen::MatrixXd & | cross, |
| const Eigen::MatrixXd & | prior, | ||
| double | sigma2 ) const |
Joint posterior covariance from the same exact eigenmode sums.
Off-diagonal entries share the diagonal's unresolved-tail and noise-damped mode decomposition, so linear actions and covariance blocks describe one posterior. The diagonal is posteriorVarianceDiagonal and is not projected; stabilizePosteriorCovariance makes the matrix positive semidefinite once the caller has validated it. Throws linalg::StableVarianceError like posteriorVarianceDiagonal.
Definition at line 4489 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::posteriorMeanEnergy | ( | const Eigen::MatrixXd & | Xstar, |
| const Eigen::VectorXd & | alpha ) const |
Definition at line 4341 of file StableBasis.cpp.
| Eigen::MatrixXd gpr::StableBasisND::posteriorMeanGradient | ( | const Eigen::MatrixXd & | Xstar, |
| const Eigen::VectorXd & | alpha ) const |
Definition at line 4354 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::posteriorMeanReducedCoeffs | ( | const Eigen::VectorXd & | y, |
| double | sigma2 ) const |
Definition at line 2847 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::posteriorMeanWeights | ( | const Eigen::VectorXd & | alpha | ) | const |
Definition at line 4330 of file StableBasis.cpp.
| double gpr::StableBasisND::posteriorVarianceAction | ( | const Eigen::MatrixXd & | cross, |
| const Eigen::MatrixXd & | prior, | ||
| const Eigen::VectorXd & | weights, | ||
| double | sigma2 ) const |
Variance of a linear action on a joint query covariance, evaluated by the same nonnegative eigenmode decomposition.
Returns NaN when the rounded basis cannot represent the action as nonnegative and throws linalg::StableVarianceError on a shape mismatch or a non-positive noise floor.
Definition at line 4557 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::posteriorVarianceDiagonal | ( | const Eigen::MatrixXd & | cross, |
| const Eigen::VectorXd & | prior, | ||
| double | sigma2 ) const |
Cancellation-free posterior diagonal for arbitrary query channels.
Each entry is one ExactSum of the nonnegative unresolved tail and the noise-damped retained and resolved-complement eigenmode terms, at the noise varianceFlooredNoise(sigma2). A null complement leaves the query's residual in the unresolved tail. An entry the rounded basis cannot represent as nonnegative is NaN; callers reject it with linalg::requireStablePosteriorVariance after any training-row identity is applied. A shape mismatch or a non-positive noise floor throws linalg::StableVarianceError.
Definition at line 4455 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::posteriorVarianceEnergy | ( | const Eigen::MatrixXd & | Xstar, |
| double | sigma2 ) const |
Definition at line 4690 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::posteriorVarianceEnergyAffine | ( | const Eigen::MatrixXd & | Ustar, |
| const Eigen::MatrixXd & | residuals, | ||
| double | sigma2 ) const |
Definition at line 4699 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::predictEnergy | ( | const Eigen::MatrixXd & | Xstar, |
| const Eigen::VectorXd & | b ) const |
Definition at line 2624 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::predictEnergyAffine | ( | const Eigen::MatrixXd & | Ustar, |
| const Eigen::MatrixXd & | residuals, | ||
| const Eigen::VectorXd & | b ) const |
Definition at line 2645 of file StableBasis.cpp.
| Eigen::MatrixXd gpr::StableBasisND::predictGradient | ( | const Eigen::MatrixXd & | Xstar, |
| const Eigen::VectorXd & | b ) const |
Definition at line 2633 of file StableBasis.cpp.
| Eigen::MatrixXd gpr::StableBasisND::predictGradientAffine | ( | const Eigen::MatrixXd & | Ustar, |
| const Eigen::MatrixXd & | residuals, | ||
| const Eigen::MatrixXd & | basis, | ||
| const Eigen::VectorXd & | b ) const |
Definition at line 2663 of file StableBasis.cpp.
| Eigen::MatrixXd gpr::StableBasisND::predictGradientHessianVectorAffine | ( | const Eigen::MatrixXd & | Ustar, |
| const Eigen::MatrixXd & | residuals, | ||
| const Eigen::MatrixXd & | basis, | ||
| const Eigen::MatrixXd & | tangent_directions, | ||
| const Eigen::MatrixXd & | residual_directions, | ||
| const Eigen::VectorXd & | b ) const |
Definition at line 2716 of file StableBasis.cpp.
|
static |
Definition at line 1842 of file StableBasis.cpp.
|
nodiscard |
The design variance of the rows of A_E at sigma2, and the retained training design it contracts against.
Definition at line 4805 of file StableBasis.cpp.
|
inline |
Definition at line 824 of file StableBasis.h.
| Eigen::MatrixXd gpr::StableBasisND::reconstructKernel | ( | bool | truncated | ) | const |
Definition at line 4722 of file StableBasis.cpp.
| void gpr::StableBasisND::recordDroppedSpectrum | ( | const Eigen::VectorXd & | S | ) |
Definition at line 996 of file StableBasis.cpp.
|
staticnoexcept |
Definition at line 4834 of file StableBasis.cpp.
|
staticnodiscardnoexcept |
Process-wide totals of SchurFloorReport over every call.
Definition at line 4823 of file StableBasis.cpp.
|
inlinenoexcept |
Likelihood variance (noise + jitter) the plateau chop must respect: a component with s^2 > chop_tol * sigma2 is never dropped, because its removal perturbs (K + sigma2 I)^-1 by s^2/sigma2 relative.
Definition at line 202 of file StableBasis.h.
|
inline |
Install a caller-built retained basis and spectrum, so a test can give the projection a basis whose columns have lost orthogonality. Only the range variance reductions, which read Psi_ and Sr_, are meaningful afterwards; every cached factorization is dropped.
Definition at line 867 of file StableBasis.h.
|
inline |
Definition at line 954 of file StableBasis.h.
| Eigen::VectorXd gpr::StableBasisND::solve | ( | const Eigen::VectorXd & | y | ) | const |
Definition at line 2619 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::solveNoisy | ( | const Eigen::VectorXd & | y, |
| double | sigma2 ) const |
Definition at line 3079 of file StableBasis.cpp.
| Eigen::VectorXd gpr::StableBasisND::stableRangePosteriorDiagonal | ( | const Eigen::MatrixXd & | rhs, |
| const Eigen::VectorXd & | prior, | ||
| const Eigen::VectorXd & | signal, | ||
| double | sigma2, | ||
| bool | check_variance = true ) const |
Range-only posterior diagonal as a nonnegative eigenmode sum.
The value is prior_j - z_j^T diag(1/(S^2+sigma2)) z_j with z_j = Psi^T rhs_j, the contraction noisyRangeSelfQuadratic subtracts, evaluated as the unresolved tail prior_j - norm(S^-1 z_j)^2 plus the noise-damped terms sigma2/(S^2+sigma2) (S^-1 z_j)^2 in ExactSum. signal_j is the variance of the diagonal that entered the sum and sets the roundoff allowance of linalg::requireStablePosteriorVariance. sigma2 is floored through varianceFlooredNoise. A shape mismatch or a non-positive noise floor throws linalg::StableVarianceError. Callers that replace training-row channels with their latent identity defer the finite/nonnegative check until after that replacement.
Definition at line 3149 of file StableBasis.cpp.
|
static |
Definition at line 871 of file StableBasis.cpp.
|
inlinenodiscardnoexcept |
Whether this factorization retained the exact assembled kernel needed by noisyBorderedVarianceIntervals. Design-only factorizations are not eligible for certification.
Definition at line 616 of file StableBasis.h.
|
inlinenodiscard |
Definition at line 916 of file StableBasis.h.
|
nodiscard |
Upper bound on the binary64 rounding error of the training-row latent variance eta2 - eta2^2 q(row), q the diagonal of (K_r + eta2 I)^-1 assembled from the retained spectrum. It includes the departure of the retained row from unit norm, which the nonnegativity of the latent variance assumes. Infinite when it cannot be bounded.
Definition at line 4915 of file StableBasis.cpp.
|
inlinenoexcept |
Definition at line 850 of file StableBasis.h.
|
inlinenoexcept |
Definition at line 828 of file StableBasis.h.
|
inlinenoexcept |
Definition at line 846 of file StableBasis.h.
|
nodiscard |
Variance-specific likelihood-noise floor for the retained spectrum.
With the stable posterior variance on, the floor resolves one squared eigenvalue to eps*s2_max and does not grow with the observation count, because the stable variances are nonnegative eigenmode sums reduced exactly. Inverse, mean, log-determinant, LOO and the training-row identity keep conditionFlooredNoise, the n*eps floor of their rounded observation-space projector. With the option off this equals conditionFlooredNoise.
Definition at line 3037 of file StableBasis.cpp.