#include <gpr/ml/GaussianProcessRegression.h>
Classes | |
| struct | ProfileSplitTotals |
| struct | MarginalLikelihoodReport |
| Result of a prior-free negative log marginal-likelihood fit. More... | |
| struct | ForceCalibrationReport |
| Componentwise held-out force calibration in physical units. More... | |
| struct | LeaveOneOutCalibrationReport |
| struct | AtomicEnvironmentParameterState |
| class | RefitTrustReport |
| struct | ActiveKernelEvidence |
| struct | PreparedHssvdHessianVector |
| class | HyperparameterPosterior |
| struct | LengthScaleTies |
| struct | LengthScaleFitState |
| struct | SecantQuadraticPriorState |
| struct | AnnealStageSummary |
| struct | ObjectivePlan |
| class | ActivePosteriorRestorePoint |
| struct | LaplaceTrainingCovarianceGeometry |
| struct | KrylovObjectiveState |
| struct | OptimizationObjectiveFrame |
| struct | ActivePosteriorState |
| struct | LaplacePosteriorStamp |
| struct | LaplacePosteriorSignature |
| struct | LaplacePosteriorState |
| struct | FittedHyperparameterDensity |
| struct | SliceLaplaceState |
| struct | OptimizerState |
Public Types | |
| enum class | MeasuredRowVerdict { Unmeasurable , Consistent , Contradicted } |
| Agreement between measured rows and the current posterior. More... | |
| enum class | LikelihoodNoiseVarianceUpdate { Invalid , Unchanged , Updated , Rebuilt } |
| enum class | MeanHessianProductStatus { Unavailable , Refused , Computed } |
| enum class | MixtureMeanHessianStatus { NotApplicable , Refused , Computed } |
| enum class | ObjectiveBackend { Auto , Dense , Krylov } |
| enum class | VarianceConvention { Predictive , Latent } |
| using | MeanHessianAction |
| using | MeanHessianPreparation |
Public Member Functions | |
| GaussianProcessRegression () | |
| GaussianProcessRegression (std::shared_ptr< const linalg::MpiCommunicator > communication) | |
| virtual | ~GaussianProcessRegression () |
| linalg::MpiContext | mpiContext () const |
| Eigen::VectorXd | solveTrainingCovarianceInFactorLayout (const Eigen::VectorXd &rhs) const |
| void | initialize (const InputParameters ¶meters, const AtomsConfiguration &conf_info) |
| Initialize GPR class. | |
| bool | initialized () const noexcept |
| void | setConditionedHessian (const Eigen::VectorXd &point, const Eigen::MatrixXd &hessian) |
| void | clearConditionedHessians () noexcept |
| bool | findConditionedHessian (const Eigen::VectorXd &point, Eigen::MatrixXd &hessian_out) const |
| void | setModelProfile (GPModelProfile profile) |
| GPModelProfile | getModelProfile () const noexcept |
| void | setAtomicEnvironmentModel (bool enabled) |
| bool | atomicEnvironmentModelEnabled () const noexcept |
| bool | atomicEnvironmentPosteriorBuilt () const |
| Eigen::Index | atomicEnvironmentInducingCount () const |
| AtomicEnvironmentParameterState | atomicEnvironmentParameterState () const |
| void | restoreAtomicEnvironmentParameterState (const AtomicEnvironmentParameterState &state) |
| void | setHyperparameters (const Observation &all_obs, const AtomsConfiguration &conf_info, const bool update_sexpat_cf_param=true, const bool update_const_cf_param=true, const bool update_sqrt_prior_param=true) |
| Set up hyperparameters for GPR. | |
| bool | configureModeRefit (const Observation &oracle, const Coord &mode, double force_tolerance, ConvergenceNormType force_norm=ConvergenceNormType::L2_NORM) |
| bool | configureMinimumModeRefit (const Observation &oracle, double force_tolerance, ConvergenceNormType force_norm=ConvergenceNormType::L2_NORM, const RefitTrustReport *trust_report=nullptr) |
| MeasuredRowVerdict | measuredRowsAgreeWithPosterior (const Observation &rows, ConvergenceNormType force_norm, double *max_force_error=nullptr, double *max_force_sd=nullptr, double *evidence_nats=nullptr, double variance_calibration=1.0, RefitTrustReport *trust_report=nullptr) |
| void | markHyperparametersFitted () noexcept |
| void | setOptimizationRowPool (std::vector< bool > pool) |
| void | clearOptimizationRowPool () noexcept |
| std::vector< std::size_t > | holdLengthScalesUnresolvedBySubset (const Observation &subset) |
| Hold, for the next fit, the length scales a pooled subset does not resolve: its inverse-distance features of that pair type span less than one length scale. Returns the held mask slots. | |
| void | setOptimizationRequiredRows (Coord positions) |
| void | clearOptimizationRequiredRows () noexcept |
| void | clearModeRefitHint () noexcept |
| void | setActivePosteriorRefits (bool enabled) noexcept |
| bool | activePosteriorRefitsEnabled () const noexcept |
| void | setEnvironmentResiduals (bool enabled) |
| bool | environmentResidualsEnabled () const noexcept |
| void | setAdditivePairResiduals (bool enabled) noexcept |
| bool | additivePairResidualsEnabled () const noexcept |
| const std::vector< ActiveKernelEvidence > & | activeKernelEvidence () const noexcept |
| double | activeFitStartForTesting () const noexcept |
| MAP objective at the start of the last active correction fit. | |
| Eigen::Index | activeFitAnchorCountForTesting () const noexcept |
| Eigen::Index | activeFitSupportCountForTesting () const noexcept |
| Eigen::Index | residualInducingCount () const noexcept |
| Eigen::Index | residualConfigurationCount () const noexcept |
| bool | hasPendingActivePosteriorRefit () const noexcept |
| bool | hasPendingResidualModelRefit () const noexcept |
| void | setUpDefault () |
| Set up default parameters. | |
| void | evaluateTrainingCovarianceMatrix (const EigenMatrix &x, const Eigen::VectorXd &x_ind, EigenMatrix &cov_matrix, bool serial_per_rank=false, bool include_constant=true, bool include_noise=true) |
| Evaluate training covariance matrix (gp_cov + noise covariance). | |
| bool | prepareTrainingKernelGeometry (const EigenMatrix &x, const Eigen::VectorXd &x_ind, TrainingKernelGeometry &out, bool reused=false) const |
| const TrainingKernelGeometry * | fitGeometryFor (const EigenMatrix &x, const Eigen::VectorXd &x_ind) const |
| void | releaseFitGeometry () const noexcept |
| std::size_t | fitGeometryBuildsForTesting () const noexcept |
| bool | evaluateTrainingCovarianceMatrixFromGeometry (const TrainingKernelGeometry &geom, const EigenMatrix &x, const Eigen::VectorXd &x_ind, EigenMatrix &cov_matrix, bool serial_per_rank=false, bool include_constant=true, bool include_noise=true) |
| bool | evaluateActiveCovarianceFromGeometry (const TrainingKernelGeometry &geom, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &theta, const std::vector< bool > &active_lengths, EigenMatrix &covariance, bool serial_per_rank=false, std::vector< EigenMatrix > *covariance_derivatives=nullptr) |
| bool | evaluateActiveCovarianceFromGeometry (const TrainingKernelGeometry &geom, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &theta, const std::vector< bool > &active_lengths, EigenMatrix &covariance, bool serial_per_rank, std::vector< EigenMatrix > *covariance_derivatives, const std::vector< Eigen::Index > &derivative_lengths) |
| bool | contractActiveCovarianceDerivatives (const TrainingKernelGeometry &geom, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &theta, const std::vector< bool > &active_lengths, const EigenMatrix &weight, const std::vector< Eigen::Index > &derivative_lengths, Eigen::VectorXd &contractions, bool serial_per_rank=false) |
| void | evaluateEnergyAndGradientFromGeometry (const Eigen::VectorXd &w, const TrainingKernelGeometry &geom, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, EnergyAndGradient &energy_and_gradient) |
| void | evaluateLeaveOneOutEnergyAndGradientFromGeometry (const Eigen::VectorXd &w, const TrainingKernelGeometry &geom, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, EnergyAndGradient &energy_and_gradient) |
| void | evaluateLocalNeighborhoodLooEnergyAndGradientFromGeometry (const Eigen::VectorXd &w, const TrainingKernelGeometry &geom, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, EnergyAndGradient &energy_and_gradient) |
| double | evaluateLocalNeighborhoodLooEnergy (const Eigen::VectorXd &w, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y) |
| double | evaluateLocalNeighborhoodLooGeometryTermForTesting (const Eigen::VectorXd &w, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, Eigen::Index geometry_index) |
| double | evaluateEnergy (const Eigen::VectorXd &w, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y) |
| bool | evaluateGradientAfterEnergy (const Eigen::VectorXd &w, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, Eigen::VectorXd &gradient) |
| double | evaluateEnergyFromGeometry (const Eigen::VectorXd &w, const TrainingKernelGeometry &geom, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y) |
| bool | evaluateGradientAfterEnergyFromGeometry (const Eigen::VectorXd &w, const TrainingKernelGeometry &geom, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, Eigen::VectorXd &gradient) |
| std::size_t | trainingGeometryApplyCallsForTesting () const |
| bool | evaluateTrainingCovarianceInFactorOrder (const EigenMatrix &x, const Eigen::VectorXd &x_ind, EigenMatrix &cov_matrix, bool include_noise=true) |
| bool | evaluateTrainingCovarianceInFactorOrderFromGeometry (const TrainingKernelGeometry &geom, const EigenMatrix &x, const Eigen::VectorXd &x_ind, EigenMatrix &cov_matrix, bool include_noise=true) |
| std::size_t | factorOrderAssembliesForTesting () const noexcept |
| bool | evaluateTrainingCrossCovarianceInFactorOrder (const EigenMatrix &query, const Eigen::VectorXd &query_ind, EigenMatrix &cross) const |
| EigenMatrix | trainingCrossCovarianceInFactorRows (const EigenMatrix &query, const Eigen::VectorXd &query_ind, bool serial_per_rank) const |
| std::size_t | factorOrderCrossAssembliesForTesting () const noexcept |
| void | evaluateHyperparameterObjectiveEnergyAndGradient (const Eigen::VectorXd &w, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, EnergyAndGradient &energy_and_gradient) |
| double | computeObjectiveStationarityShiftNorm (const EigenMatrix &opt_R_matrix, const Eigen::VectorXd &opt_R_indices, const Eigen::VectorXd &opt_y, const Eigen::VectorXd &theta_reference, Eigen::VectorXd *shift_out=nullptr, double *energy_out=nullptr, Eigen::VectorXd *gradient_out=nullptr) |
| int | lastRefitKind () const noexcept |
| double | lastStationarityShift () const noexcept |
| double | lastStationarityThreshold () const noexcept |
| int | lastStationarityModel () const noexcept |
| bool | refreshFullDataPosteriorIfObjectiveStationary (const Observation &full_observation, double *shift_norm_out=nullptr) |
| double | computeLaplaceSkipScgShiftNorm (const EigenMatrix &opt_R_matrix, const Eigen::VectorXd &opt_R_indices, const Eigen::VectorXd &opt_y) |
| void | evaluateCovarianceMatrix (const EigenMatrix &x1, const EigenMatrix &x2, const Eigen::VectorXd &x1_ind, const Eigen::VectorXd &x2_ind, EigenMatrix &C, bool serial_per_rank=false) const |
| Evaluate covariance matrix between two input vectors. | |
| void | extractUniqueIndices (const Eigen::VectorXd &input_ind, Eigen::VectorXd &output_ind) const |
| Extract unique indices from the input vector. | |
| void | evaluateEnergyAndGradient (const Eigen::VectorXd &w, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, EnergyAndGradient &energy_and_gradient) |
| Evaluate the energy function (un-normalized negative marginal log posterior) and its gradient. | |
| void | optimize (const Observation &observation) |
| Optimize paramaters of a Gaussian process. | |
| MarginalLikelihoodReport | optimizeMarginalLikelihood (const Observation &observation) |
| bool | appendFixedHyperparameters (const Observation &full_observation) |
| Eigen::Index | fullFitObservationCount () const noexcept |
| Eigen::Index | fullFitCoordinateCount () const noexcept |
| ForceCalibrationReport | calibrateHeldOutForces (const Observation &held_out, double nominal_probability) |
| LeaveOneOutCalibrationReport | calibrateLeaveOneOut (double nominal_probability) const |
| LikelihoodNoiseVarianceUpdate | setLikelihoodNoiseVariance (double physical_sigma2, const Observation *full_observation=nullptr) |
| Set the likelihood noise variance in physical output units. | |
| LikelihoodNoiseVarianceUpdate | setLikelihoodNoiseVariance (double physical_sigma2, const Observation &full_observation) |
| bool | applyLikelihoodNoiseVarianceFloor (double floor_sigma2, const Observation &full_observation) |
| Raise the Gaussian likelihood noise variance to a floor. | |
| void | evaluatePriorMeanTargets (const Eigen::VectorXd &positions, double &energy, Eigen::VectorXd &gradient) const |
| Prior-mean targets for a virtual (conditioning-only) observation at ~positions~. | |
| void | optimizeFactorized (const Observation &observation) |
| Alternative optimization via eigendecomposition + noise grid search. | |
| void | optimizeChemistryFactorized (const Observation &observation) |
| Chemistry-constrained ARD refit: pairtype lengthscale ratios fixed from descriptor spreads, global scale on a warm-centered log grid, (prefactor, noise) exact per grid point via the factorized likelihood. A handful of factorizations per refit instead of an SCG trajectory; ratio churn between refits is structurally impossible. Enabled by setChemFactorizedHyperparameters(true); degenerate descriptor scales fall back to the SCG core. | |
| bool | observationBandInfluence (const Observation &observation, const Coord &band_positions, Eigen::VectorXd &influence, bool collective=false) |
| Per-observation influence on the band posterior. | |
| bool | observationBandInfluence (const Observation &observation, const Coord &band_positions, Eigen::VectorXd &influence, bool collective, const std::vector< char > &protected_rows, Eigen::VectorXd *removal_norm=nullptr) |
| void | setChemFactorizedHyperparameters (bool enabled) noexcept |
| void | setPhysicsCollocationPath (const Coord &path_points) |
| Physics collocation set for hyperparameter selection: the live band (discrete IRC). When nonempty, the chem-factorized grid rejects hyperparameters whose posterior energy profile along these points oscillates (total variation beyond a scale-free multiple of the profile range), a constrained empirical-Bayes filter in the physics-informed-GP sense. Empty clears the filter. | |
| bool | getChemFactorizedHyperparameters () const noexcept |
| void | calculatePotential (Observation &image1) |
| Calculate potential within GPR model. | |
| bool | calculateMeanHessianVectorHssvd (const Coord &R, const Eigen::VectorXd &direction, Eigen::VectorXd &hessian_vector) const |
| bool | calculateMeanHessianVectorDispatched (const Coord &R, const Eigen::VectorXd &direction, Eigen::VectorXd &hessian_vector) |
| MixtureMeanHessianStatus | calculateLaplaceMixtureMeanHessianVector (const Coord &R, const Eigen::VectorXd &direction, Eigen::VectorXd &hessian_vector) |
| MeanHessianAction | prepareMeanHessian (const Coord &R) |
| Linear action of the physical posterior mean at one geometry. | |
| bool | calculateMeanHessian (const Coord &R, Eigen::MatrixXd &hessian) |
| Dense Hessian of the physical posterior mean at one geometry. | |
| bool | calculateExactDirectionalCurvature (const Coord &R, const Eigen::VectorXd &direction, double &curvature) |
| MeanHessianAction | prepareAnalyticMeanHessian (const Coord &R) |
| bool | prepareMeanHessianVectorHssvd (const Coord &R, PreparedHssvdHessianVector &prepared) const |
| bool | applyMeanHessianVectorHssvd (const PreparedHssvdHessianVector &prepared, const Eigen::VectorXd &direction, Eigen::VectorXd &hessian_vector) const |
| bool | applyMeanHessianBlockHssvd (const PreparedHssvdHessianVector &prepared, const Eigen::MatrixXd &directions, Eigen::MatrixXd &hessian_block) const |
| void | calculatePotentialLaplace (Observation &image1) |
| Laplace-mixture-mean potential prediction (INLA, Rue et al. 2009). | |
| void | calculatePotentialLaplaceSlice (Observation &image1) |
| void | calculateVarianceLaplaceSlice (Observation &image1) |
| void | setUncertaintyMode (UncertaintyMode mode) |
| UncertaintyMode | getUncertaintyMode () const |
| HyperparameterPosterior | retainHyperparameterPosterior () |
| HyperparameterPosterior | currentHyperparameterPosterior () const |
| Retain an existing, current quadrature without estimating a new one. | |
| bool | conditionOnHyperparameterPosterior (const HyperparameterPosterior &posterior) |
| void | setUseAlphaKPredictMean (bool use) noexcept |
| Enable the alpha-K contraction for MAP mean prediction. | |
| bool | getUseAlphaKPredictMean () const noexcept |
| void | setUseAlphaKLaplaceMean (bool use) noexcept |
| Enable the alpha-K contraction for Laplace-mixture mean prediction. | |
| bool | getUseAlphaKLaplaceMean () const noexcept |
| void | setLaplaceSkipScgThreshold (double threshold) noexcept |
| double | getLaplaceSkipScgThreshold () const noexcept |
| void | setObjectiveStationaritySkipThreshold (double threshold) noexcept |
| double | getObjectiveStationaritySkipThreshold () const noexcept |
| void | setObjectiveStationaritySkipAuto (bool use) noexcept |
| void | setFitStepStop (bool use) noexcept |
| Whether the auto stationarity mode also ends each fit at its scale. | |
| bool | getObjectiveStationaritySkipAuto () const noexcept |
| bool | objectiveStationaritySkipMayBeActive () const noexcept |
| bool | usesFullObservationForHyperparameterOptimization (const Observation &observation) const noexcept |
| double | objectiveStationaritySkipThresholdForTesting (const Eigen::VectorXd &theta_reference) const noexcept |
| bool | hasObjectiveStationarityHessianForTesting () const noexcept |
| bool | hasObjectiveStationarityInverseHessianForTesting () const noexcept |
| void | setObjectiveStationarityHessianCholForTesting (const Eigen::MatrixXd &U) |
| void | setObjectiveStationarityInverseHessianForTesting (const Eigen::MatrixXd &H_inverse) |
| void | setObjectiveStationarityBbInverseScaleForTesting (Eigen::Index dimension, double inverse_scale) |
| void | setSliceLaplaceHessianCholForTesting (const Eigen::MatrixXd &U) |
| void | setUseTrainingGeometryHandle (bool use) noexcept |
| bool | getUseTrainingGeometryHandle () const noexcept |
| void | setProfilePredictMean (bool enabled) noexcept |
| bool | getProfilePredictMean () const noexcept |
| void | setProfileEnergySplit (bool enabled) noexcept |
| bool | getProfileEnergySplit () const noexcept |
| void | setProfileGradientSplit (bool enabled) noexcept |
| bool | getProfileGradientSplit () const noexcept |
| const ProfileSplitTotals & | profileSplitTotals () const noexcept |
| void | resetProfileSplitTotals () noexcept |
| void | logProfileSplitSummary () |
| void | setHutchinsonProbes (int num_probes) noexcept |
| int | getHutchinsonProbes () const noexcept |
| void | setHssvdBackend (bool enabled) noexcept |
| bool | getHssvdBackend () const noexcept |
| void | setRigidNullDeflation (bool enabled) |
| Opt-in rigid-motion nullspace deflation for free systems. | |
| bool | rigidNullDeflationEnabled () const noexcept |
| const RigidDeflationDiagnostic & | rigidDeflationDiagnostic () const noexcept |
| bool | hasReusableHssvdPosterior () const noexcept |
| void | setHssvdObjectiveContractions (bool enabled) noexcept |
| bool | getHssvdObjectiveContractions () const noexcept |
| void | setHssvdDualChopTolerance (double tol) noexcept |
| double | getHssvdDualChopTolerance () const noexcept |
| void | setHssvdDualRandomizedSketch (int sketch_size) noexcept |
| int | getHssvdDualRandomizedSketch () const noexcept |
| void | setHssvdDualLapackRrr (bool enabled) noexcept |
| bool | getHssvdDualLapackRrr () const noexcept |
| void | setHssvdLocalActiveSetSize (int size) noexcept |
| int | getHssvdLocalActiveSetSize () const noexcept |
| void | setHssvdLocalPosteriorActiveSetSize (int size) noexcept |
| int | getHssvdLocalPosteriorActiveSetSize () const noexcept |
| void | setMapMeanKernelForTesting (std::shared_ptr< const KernelOperator > kernel) |
| Install the kernel used as the MAP mean expansion. | |
| void | setMapMeanKernelOverridesHssvdForTesting (bool override) noexcept |
| Make an installed MAP test kernel take precedence over HS-SVD. | |
| bool | installActivePosteriorHessianActionsForTesting (MeanHessianPreparation background, bool background_exact, MeanHessianPreparation residual, bool residual_exact) |
| Replace the active posterior's Hessian actions for one test. | |
| void | resetHssvdHessianVectorCallsForTesting () const noexcept |
| void | setHssvdHessianBlockApplyFailsForTesting (bool fail) const noexcept |
| Make the dense HS-SVD block apply fail for one test. | |
| std::size_t | getHssvdHessianVectorCallsForTesting () const noexcept |
| void | resetDispatchedMapMeanHessianActionsForTesting () const noexcept |
| Reset the count of exact MAP Hessian actions built by dispatch. | |
| std::size_t | getDispatchedMapMeanHessianActionsForTesting () const noexcept |
| Count of exact MAP Hessian actions built by dispatch. | |
| void | setDisableOutputNormalization (bool d) noexcept |
| void | setPriorMeanStatistic (PriorMeanStatistic statistic) noexcept |
| PriorMeanStatistic | priorMeanStatistic () const noexcept |
| bool | getDisableOutputNormalization () const noexcept |
| void | setOutputScaleFloor (bool enabled) noexcept |
| bool | outputScaleFloor () const noexcept |
| void | synchronizeOutputTransformFrom (const GaussianProcessRegression &source) |
| void | restoreOutputTransform (double mean, double scale, bool frozen_mean) |
| Restore output coordinates alongside a kernel represented in them. | |
| double | outputMean () const noexcept |
| double | outputScale () const noexcept |
| bool | outputMeanFrozen () const noexcept |
| void | setPopulationPrior (priors::PopulationPrior prior) |
| const priors::PopulationPrior & | populationPrior () const noexcept |
| void | applyPopulationPrior (const AtomsConfiguration &conf_info, const Eigen::VectorXd &ls_k, double own_s2_log) |
| void | setUseLsPrior (bool use) noexcept |
| bool | getUseLsPrior () const noexcept |
| void | setUseLogNormalMagnPrior (bool use) noexcept |
| bool | useLogNormalMagnPrior () const noexcept |
| void | setLengthScaleSeedChemicalFloor (bool enabled) noexcept |
| bool | getLengthScaleSeedChemicalFloor () const noexcept |
| void | setRobustNu (double nu) noexcept |
| double | robustNu () const noexcept |
| bool | updateRobustRowWeights (const Observation &full_observation) |
| const Eigen::VectorXd & | robustResidualNormsForTesting () const noexcept |
| const Eigen::VectorXd & | robustExtraNoiseForTesting () const noexcept |
| LengthScaleFitState | lengthScaleFitState () const |
| void | restoreLengthScaleFitState (const LengthScaleFitState &state) |
| void | configureLengthScaleTies (const AtomsConfiguration &configuration) |
| const LengthScaleTies & | lengthScaleTies () const noexcept |
| void | setLengthScaleTies (bool enabled) |
| void | releaseLengthScaleTieForTesting (Index_t member) |
| int | lastTieScreenProbes () const noexcept |
| bool | lastTieScreenUsedHessianVector () const noexcept |
| const std::vector< double > & | lastTieScreenCurvatures () const noexcept |
| bool | lengthScaleTiesActive (Eigen::Index length_count) const noexcept |
| void | tieLengthScaleParameters (Eigen::VectorXd &theta) const |
| Sets every tied member to its leader's log length (theta(1 + t)). | |
| void | poolDescriptorScaleByTies (Eigen::VectorXd &scales) const |
| void | reduceTiedLengthScaleGradient (Eigen::VectorXd &gradient) const |
| void | refreshLengthScaleLeaders () |
| Recomputes the leaders from the released flags. | |
| void | setPairLocalTiles (bool enabled) noexcept |
| bool | pairLocalTilesEnabled () const noexcept |
| void | setPairLocalDirectionalTiles (bool enabled) noexcept |
| void | setPrincipledNugget (bool use) |
| bool | getPrincipledNugget () const noexcept |
| void | setKappaMax (double kappa_max) noexcept |
| double | getKappaMax () const noexcept |
| void | setUseZBLPriorMean (bool use) |
| bool | getUseZBLPriorMean () const noexcept |
| void | setUseFFPriorMean (bool use) |
| void | setSecantQuadraticPrior (const Eigen::VectorXd &position, const Eigen::VectorXd &gradient, const Eigen::MatrixXd &hessian, double reference_energy) |
| void | clearSecantQuadraticPrior () noexcept |
| SecantQuadraticPriorState | retainSecantQuadraticPrior () const |
| void | restoreSecantQuadraticPrior (const SecantQuadraticPriorState &state) |
| bool | physicalPriorMeanActive () const noexcept |
| True when the ZBL or Morse prior mean is the one evaluation uses. | |
| bool | samplePhysicalPriorMean (const Eigen::VectorXd &position, double &energy, Eigen::VectorXd &gradient) const |
| const Eigen::MatrixXd & | secantQuadraticHessian () const |
| void | addLayeredPriorHessianAction (const Eigen::VectorXd &position, const Eigen::VectorXd &direction, Eigen::VectorXd &action) const |
| H_prior(x) v + H_q v, with either term absent when that mean is off. | |
| int | secantQuadraticPriorUses () const noexcept |
| bool | secantQuadraticPriorActive () const noexcept |
| bool | getUseFFPriorMean () const noexcept |
| void | setLogTrainingGeometry (bool enabled) noexcept |
| bool | getLogTrainingGeometry () const noexcept |
| void | setLogRankBlockCholesky (bool enabled) noexcept |
| bool | getLogRankBlockCholesky () const noexcept |
| void | setScalapackBlockSize (int block_size) noexcept |
| int | getScalapackBlockSize () const noexcept |
| void | setScalapackNprow (int nprow) noexcept |
| int | getScalapackNprow () const noexcept |
| void | setCutlassPluginPath (std::string path) |
| const std::string & | getCutlassPluginPath () const noexcept |
| void | setUsePsisLaplace (bool use) noexcept |
| bool | getUsePsisLaplace () const noexcept |
| void | setUsePsisDeterministicGrid (bool use) noexcept |
| bool | getUsePsisDeterministicGrid () const noexcept |
| void | setUseDeltaMethod (bool use) noexcept |
| bool | getUseDeltaMethod () const noexcept |
| void | setDeltaUHMinDiag (double v) noexcept |
| double | getDeltaUHMinDiag () const noexcept |
| void | setDeltaMaxRatio (double v) noexcept |
| double | getDeltaMaxRatio () const noexcept |
| void | buildRFFModel (const Observation &training_data, int D_rff) |
| void | calculatePotentialRFF (Observation &image) |
| void | calculateVarianceRFF (Observation &image) |
| int | getRFFFeatures () const noexcept |
| bool | isRFFBuilt () const noexcept |
| void | setRFFFeaturesRequested (int D_rff) |
| int | getRFFFeaturesRequested () const noexcept |
| void | enableRFFFeatureSelection (double force_tol_fraction=0.0) |
| bool | rffFeatureSelectionAuto () const noexcept |
| double | rffForceTolFraction () const noexcept |
| RFFFeatureSelection | selectRFFFeatures (const Observation &observation, std::uint64_t memory_cap_bytes=kRFFValidationMemoryCapBytes) |
| const RFFFeatureSelection & | rffFeatureSelection () const noexcept |
| void | setHyperparameterOptimizationMode (HyperparameterOptimizationMode mode) noexcept |
| void | setRgminMethod (rgmin_method_t m) noexcept |
| void | setVarianceSubsetConfigurations (int configurations) noexcept |
| void | setVarianceSubsetFootprint (bool enabled) noexcept |
| bool | varianceSubsetFootprint () const noexcept |
| void | setVarianceSubsetConfigurationIds (std::vector< int > ids) |
| const std::vector< int > & | varianceSubsetConfigurationIds () const noexcept |
| std::size_t | varianceSubsetQueriesForTesting () const noexcept |
| std::size_t | varianceSubsetFactorizationsForTesting () const noexcept |
| void | setAnnealStage (bool enabled, std::size_t budget, std::size_t replicas, std::size_t every, std::uint64_t seed) |
| void | noteSurrogateContradiction () noexcept |
| const AnnealStageSummary & | lastAnnealStage () const noexcept |
| The last stage that ran, for diagnostics and tests. | |
| std::size_t | lastFitEvaluationsForTesting () const noexcept |
| Objective evaluations of the last hyperparameter fit. | |
| std::size_t | rgminWarmStartsForTesting () const noexcept |
| Fits the rgmin sessions opened with the previous fit's record. | |
| std::size_t | rgminWarmPairsForTesting () const noexcept |
| Curvature pairs the last rgmin fit transplanted from that record. | |
| void | setRgminWarmStart (bool keep) noexcept |
| void | forgetRgminSessions () noexcept |
| HyperparameterOptimizationMode | getHyperparameterOptimizationMode () const noexcept |
| const char * | getHyperparameterOptimizerBackend () const noexcept |
| void | setHyperparameterObjectiveMode (HyperparameterObjectiveMode mode) noexcept |
| HyperparameterObjectiveMode | getHyperparameterObjectiveMode () const noexcept |
| virtual bool | exactNlmlHessianVectorAvailable () const noexcept |
| bool | nlmlHessianVectorCurvatureRequested () const noexcept |
| int | nlmlHessianVectorFallbacks () const noexcept |
| void | noteNlmlHessianVectorFallback (const char *where, const char *why) |
| void | setOptimizationSubsetHistory (int rows) noexcept |
| int | getOptimizationSubsetHistory () const noexcept |
| void | setSubsetFailureEscalation (bool enabled) noexcept |
| bool | subsetFailureEscalation () const noexcept |
| void | setRgminInitialLogMove (double distance) noexcept |
| double | rgminInitialLogMove () const noexcept |
| void | setRgminInitialLogMoveWholeSession (bool whole_session) noexcept |
| void | setSkipUnchangedSubsetFit (bool enabled) noexcept |
| bool | skipUnchangedSubsetFit () const noexcept |
| std::size_t | unchangedSubsetFitSkipsForTesting () const noexcept |
| Fits skipped because the subset and the theta were unchanged. | |
| std::size_t | lastFitConfigurationsForTesting () const noexcept |
| bool | lastWarmStartInfeasible () const noexcept |
| Eigen::VectorXd | fittedKernelParameters () const |
| void | setHyperparameterActiveMaskForTesting (const std::vector< bool > &mask) |
| void | setScgMaxIterationsForTesting (Index_t max_iter) noexcept |
| void | setWallClockLimit (std::shared_ptr< const WallClockLimit > limit) |
| bool | wallClockLimitReached () const |
| Collective on the model's process group for distributed fitters. | |
| void | setResidualDiagonalCorrectionForTesting (bool use, double eps) noexcept |
| void | setNlmlHessianVectorFailureForTesting (bool fail) noexcept |
| void | setScgDampingLimitForTesting (double limit) noexcept |
| void | setFitTolerancesForTesting (double objective, double step) noexcept |
| void | setObjectiveBackend (ObjectiveBackend backend, Eigen::Index rank=0) |
| void | setObjectiveBackendForTesting (ObjectiveBackend backend, Eigen::Index rank=0) |
| ObjectiveBackend | lastObjectiveBackend () const noexcept |
| ObjectivePlan | objectivePlan () const noexcept |
| const linalg::linop::DenseResultCache & | denseResultsForTesting () const noexcept |
| std::size_t | gradientReplicatedInverseEntriesForTesting () const noexcept |
| double | fitStepTolerance () const noexcept |
| bool | lastScgFallbackUsedForTesting () const noexcept |
| bool | scgStalledForTesting () const noexcept |
| void | setRequireScgFallbackImprovement (bool enabled) noexcept |
| bool | requiresScgFallbackImprovement () const noexcept |
| bool | lastScgHitIterationBudgetForTesting () const noexcept |
| int | lastFitIterations () const noexcept |
| int | lastFitRestarts () const noexcept |
| Restarts of the last fit; only a marginal-likelihood fit restarts. | |
| const char * | lastFitStopReason () const noexcept |
| void | resetLaplacePosteriorSignatureBuildsForTesting () const noexcept |
| std::size_t | laplacePosteriorSignatureBuildsForTesting () const noexcept |
| bool | scaleLaplaceFactorForTesting (std::size_t index, double scale) |
| void | setForceFactorOwnerLaplaceMeanForTesting (bool value) noexcept |
| bool | disableLaplaceFactorsForTesting () |
| void | resetLaplaceMeanBlockPartitionCallsForTesting () const noexcept |
| std::size_t | laplaceMeanBlockPartitionCallsForTesting () const noexcept |
| void | resetIncrementalCholeskyCountersForTesting () const noexcept |
| void | invalidateTrainingFactorCache () |
| std::size_t | incrementalCholeskyUpdatesForTesting () const noexcept |
| std::size_t | fullCholeskyFactorizationsForTesting () const noexcept |
| std::size_t | serialFactorReusesForTesting () const noexcept |
| bool | devicePosteriorLiveForTesting () const noexcept |
| bool | residentTrainingFactorRetainedForTesting () const noexcept |
| bool | devicePosteriorCapableForTesting () const |
| EigenMatrix | trainingCovarianceForTesting () const |
| std::size_t | activeEnergyVarianceSolvesForTesting () const noexcept |
| std::size_t | inverseDiagonalAppendsForTesting () const noexcept |
| std::size_t | bandInfluenceFactorReusesForTesting () const noexcept |
| Eigen::VectorXd | trainingInverseDiagonalForTesting () const |
| std::size_t | inverseDiagonalBuildsForTesting () const noexcept |
| void | resetHssvdAppendCountersForTesting () const noexcept |
| std::size_t | hssvdAppendUpdatesForTesting () const noexcept |
| void | resetHssvdFactorizationCountersForTesting () const noexcept |
| std::size_t | hssvdFullFactorizationsForTesting () const noexcept |
| void | resetFullDataRebuildCountersForTesting () const noexcept |
| std::size_t | fullDataRebuildsForTesting () const noexcept |
| Eigen::Index | hssvdBasisObservationCountForTesting () const noexcept |
| const StableBasisND & | hssvdBasisForTesting () const noexcept |
| bool | hssvdEnergyDesign (const FieldMatrixd &query, Eigen::VectorXd &design, Eigen::VectorXd &coeff) const |
| double | hssvdBasisConditionNumberForTesting () const noexcept |
| double | hssvdVarianceCalibrationFactorForTesting () const noexcept |
| void | setHssvdVarianceCalibrationFactorForTesting (double factor) noexcept |
| void | setOutputScaleForTesting (double scale) noexcept |
| void | scaleTrainingVarianceToPhysical (Eigen::Ref< Eigen::VectorXd > variance) const |
| double | totalPosteriorNoiseVarianceForTesting () const noexcept |
| bool | hssvdLocalPosteriorCovarianceForTesting (const EigenMatrix &positions, const EigenMatrix &prior, EigenMatrix &K_post) |
| bool | applyHssvdTrainingRowLatentVarianceForTesting (const EigenMatrix &positions, Eigen::VectorXd &variance, double total_sigma2) const |
| void | applyHssvdTrainingRowLatentCovarianceForTesting (const EigenMatrix &positions, EigenMatrix &covariance, double total_sigma2) const |
| void | setHssvdRetainedSpectrumForTesting (Eigen::MatrixXd psi, Eigen::VectorXd singular_values) |
| double | reportedVarianceCalibrationFactor () const noexcept |
| bool | hssvdObjectiveBasisValidForTesting () const |
| bool | hssvdObjectiveTraceBasisMaterializedForTesting () const noexcept |
| Eigen::Index | hssvdObjectivePendingReplicatedEntriesForTesting () const noexcept |
| double | hssvdObjectiveConditionNumberForTesting () const |
| Eigen::Index | hssvdObjectiveRankForTesting () const |
| double | hssvdObjectiveTraceInvNoiseForTesting () const noexcept |
| const StructuredPermutation & | trainingPermutationForTesting () const noexcept |
| bool | hssvdObjectiveUsesDirectInverseForTesting () const noexcept |
| bool | hssvdObjectiveTraceViaCholeskyForTesting () const noexcept |
| void | resetLeaveOneOutObjectiveEvaluationsForTesting () const noexcept |
| std::size_t | leaveOneOutObjectiveEvaluationsForTesting () const noexcept |
| void | resetLocalLooObjectiveEvaluationsForTesting () const noexcept |
| std::size_t | localLooObjectiveEvaluationsForTesting () const noexcept |
| Eigen::Index | hssvdDualForceWeightRowsForTesting () const noexcept |
| Eigen::Index | hssvdDualForceWeightColsForTesting () const noexcept |
| bool | hssvdDualAlphaKPreparedForTesting () const noexcept |
| void | resetDistributedHssvdDualKernelAssemblyCallsForTesting () const noexcept |
| std::size_t | distributedHssvdDualKernelAssemblyCallsForTesting () const noexcept |
| void | resetDistributedHssvdDualKernelFactorizationCallsForTesting () const noexcept |
| std::size_t | distributedHssvdDualKernelFactorizationCallsForTesting () const noexcept |
| void | setDescriptorPredictor (bool enabled) noexcept |
| void | setVarianceConvention (VarianceConvention convention) noexcept |
| VarianceConvention | varianceConvention () const noexcept |
| const char * | hyperparameterOptimizationModeName () const noexcept |
| Name of the hyperparameter fit in force, for the run report. | |
| std::size_t | lastInlaIterations () const noexcept |
| Newton (RFO) iterations taken by the most recent INLA mode search. | |
| void | calculateInlaModeLogBoundsForTesting (const Eigen::VectorXd &theta_seed, double min_lengthscale, const EigenMatrix &x, const Eigen::VectorXd &y, Eigen::VectorXd &lower, Eigen::VectorXd &upper) const |
| double | inlaMinimumLengthScaleForTesting (double range_x) const |
| bool | computeInlaPosteriorModeForTesting (const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, Eigen::VectorXd &theta_mode, const TrainingKernelGeometry *training_geom) |
| bool | hssvdDualKernelActiveForTesting () const noexcept |
| bool | assembleHssvdDualFullCrossCovarianceForTesting (const EigenMatrix &positions, EigenMatrix &Kstar) const |
| bool | denseVariancePanelForTesting (const EigenMatrix &positions, EigenMatrix &whitened, Eigen::VectorXd &prior) const |
The whitened panel L^{-1} K(X, x*) and prior diagonal that the dense Cholesky marginal variance of positions reduces, built by the same assembly and triangular solve as calculateVariance. | |
| bool | assembleHssvdDualCrossCovarianceForTesting (const EigenMatrix &positions, EigenMatrix &Kstar, Eigen::VectorXd &prior_diag, bool energy_only) const |
The dual-kernel cross covariance and prior diagonal that the HS-SVD variance routes contract; energy_only selects the energy columns the energy gate reads. | |
| bool | assembleHssvdDualTrainingKernelForTesting (EigenMatrix &kernel) const |
| Eigen::Index | hssvdLastLocalActiveSetConfigCountForTesting () const noexcept |
| Eigen::Index | hssvdLastLocalActiveSetObservationCountForTesting () const noexcept |
| double | hssvdLastLocalActiveSetConditionNumberForTesting () const noexcept |
| Eigen::Index | hssvdLastLocalPosteriorConfigCountForTesting () const noexcept |
| Eigen::Index | hssvdLastLocalPosteriorObservationCountForTesting () const noexcept |
| double | hssvdLastLocalPosteriorConditionNumberForTesting () const noexcept |
| void | resetDistributedTrainingCovarianceAssemblyCallsForTesting () const noexcept |
| std::size_t | distributedTrainingCovarianceAssemblyCallsForTesting () const noexcept |
| void | calculatePotentialDispatched (Observation &image1) |
| void | calculatePotentialBatch (std::vector< Observation * > queries) |
| void | calculateVarianceBatch (std::vector< Observation * > queries) |
| One dispatched variance predict for B same-composition queries. | |
| std::uint64_t | factorEpoch () const noexcept |
| std::size_t | varianceSolveCacheHitsForTesting () const noexcept |
| void | calculateVarianceLaplace (Observation &image1) |
| void | calculateVarianceDispatched (Observation &image1) |
| void | calculateVarianceHssvd (Observation &image1) |
| void | calculateObservationPosteriorCovariance (const EigenMatrix &positions, EigenMatrix &K_post, bool allow_hssvd_local=true) |
| Eigen::VectorXd | calculateObservationNoiseDiagonal (const EigenMatrix &positions) const |
| std::optional< JointObservationVarianceReduction > | calculateObservationForceVarianceReduction (const EigenMatrix &positions, Eigen::Index candidate_query, const std::vector< Eigen::Index > &target_queries, double noise_variance, bool allow_hssvd_local=true) |
| void | calculateBackgroundObservationPosteriorCrossCovariance (const EigenMatrix &left, const EigenMatrix &right, EigenMatrix &covariance, const Eigen::VectorXd *mean_weights=nullptr) |
| double | calculateObservationFunctionalVariance (const EigenMatrix &positions, const Eigen::VectorXd &weights) |
| bool | conditionActivePosterior (const Observation &full_observation, std::shared_ptr< const KernelOperator > active_kernel={}) |
| bool | hasActivePosterior () const noexcept |
| Eigen::Index | activePosteriorObservationCount () const noexcept |
| bool | fitActivePosterior (const Observation &full_observation, const std::vector< bool > &active_lengths, bool compare_cartesian_residual=false) |
| bool | refreshActivePosterior (const Observation &full_observation) |
| ActivePosteriorRestorePoint | retainActivePosterior () const |
| bool | restoreActivePosterior (const ActivePosteriorRestorePoint &point, const Observation &full_observation) |
| std::shared_ptr< const KernelOperator > | makeActiveCovarianceOperator (const Eigen::VectorXd &theta, const std::vector< bool > &active_lengths) const |
| bool | trainingFactorAppendable (Eigen::Index observations) const |
| std::size_t | distributedFactorAppendsForTesting () const noexcept |
| Rebuilds that appended to the cached distributed factor. | |
| bool | hasBeenOptimized () const |
| void | setJitterSigma2 (double value) |
| Set sigma2 jitter value. | |
| double | getJitterSigma2 () const noexcept |
| Configured numerical diagonal jitter variance. | |
| void | setChainImageCount (int n) |
| void | setLengthscaleFloor (double floor) |
| double | getLengthscaleFloor () const noexcept |
| void | setParameters (const GPRSetup ¶meters) |
| Set parameters of the GPR model. | |
| LikGaussian & | getLikGaussian () |
| const LikGaussian & | getLikGaussian () const |
| SexpatCF & | getSexpAtCovarianceFunction () |
| const SexpatCF & | getSexpAtCovarianceFunction () const |
| void | setInternalCoordinateChart (std::shared_ptr< const geometry::InternalCoordinateChart > chart, double length_scale) |
| void | setGeodesicHeatPrior (std::shared_ptr< const GeodesicHeatEnergyForceKernel > kernel) |
| double | fitGeodesicHeatPrior (const Coord &reference_path, const Observation &training_data) |
| void | clearGeodesicHeatPrior () |
| std::optional< double > | inferInternalCoordinateLengthScale (const geometry::InternalCoordinateChart &chart) const |
| double | getSigma2 () const noexcept |
| double | getPhysicalTotalDiagonalRegularization () const noexcept |
| double | likelihoodNoiseVariance () const noexcept |
| ConstantCF & | getConstantCovarianceFunction () |
| const ConstantCF & | getConstantCovarianceFunction () const |
| Index_t | getNumberOfPotentialCalls () const |
| const EigenMatrix & | getL () const |
| bool | hasTrainingCholeskyFactor (Eigen::Index expected_rows) const noexcept |
| bool | parkTrainingCholeskyFactor () |
| bool | activateMaterializedPosterior () |
| void | claimActiveTrainingCholeskyFactor () |
| Associate the live ScaLAPACK factor with this GP after a materialize. | |
| const Eigen::VectorXd & | getAlpha () const |
| const EigenMatrix & | getRMatrix () const noexcept |
| const Eigen::VectorXd & | getRIndices () const noexcept |
| bool | hasTrainingPermutation () const |
| EigenMatrix | rowsInTrainingFactorLayout (const EigenMatrix &input) const |
| EigenMatrix | symmetricMatrixInTrainingFactorLayout (const EigenMatrix &input) const |
| void | setParameters (const Eigen::VectorXd &w) |
| Set GP parameters. This function sets parameters in the covariance functions sexpat and constant and in the Gaussian likelyhood lik_gaussian. | |
| Eigen::VectorXd | packInlaHyperparameters () const |
| void | setHierarchicalPrior (const Eigen::VectorXd &mu_log, double s2_log) |
| void | clearHierarchicalPrior () |
| bool | assembleCompositeJointCovariance (const EigenMatrix &x, const Eigen::VectorXd &indices, SexpatCF &covariance, EigenMatrix &result) const |
| bool | assembleCompositeJointCrossCovariance (const EigenMatrix &left, const EigenMatrix &right, const Eigen::VectorXd &left_indices, const Eigen::VectorXd &right_indices, SexpatCF &covariance, EigenMatrix &result) const |
| bool | assembleCompositeJointCovarianceSecondDerivative (const EigenMatrix &x, const Eigen::VectorXd &indices, SexpatCF &covariance, const Eigen::VectorXd &direction, EigenMatrix &second) const |
| bool | assembleCompositeJointCovarianceDerivatives (const EigenMatrix &x, const Eigen::VectorXd &indices, SexpatCF &covariance, std::vector< EigenMatrix > &derivatives) const |
| template<typename CovFunc> | |
| void | accumulateCrossCovarianceMatVecLocal (const EigenMatrix &x1, const EigenMatrix &x2, const Eigen::VectorXd &ind_Ddim, const Eigen::VectorXd &uDdim, const Eigen::VectorXd &ind_Ddim2, const Eigen::VectorXd &uDdim2, CovFunc &cov_func, const Eigen::VectorXd &weights, Eigen::VectorXd &output, bool do_reduce=true, bool select_prediction_product=false) const |
| Accumulate local K(x1, x2)^T * weights contributions without materializing the full cross-covariance matrix. | |
| void | assembleDirectionalCovarianceDerivatives (const EigenMatrix &x, const Eigen::VectorXd &ind_Ddim, const Eigen::VectorXd &uDdim, const Eigen::VectorXd &direction, EigenMatrix &first, EigenMatrix &second, bool serial_per_rank=false) const |
| Assemble the directional first and second derivatives of the training covariance matrix for the optimized Sexpat parameters. | |
| bool | assembleDirectionalCovarianceDerivativesFromGeometry (const TrainingKernelGeometry &geom, const EigenMatrix &x, const Eigen::VectorXd &ind_Ddim, const Eigen::VectorXd &uDdim, const Eigen::VectorXd &direction, EigenMatrix &first, EigenMatrix &second, bool serial_per_rank=false) const |
| std::optional< bool > | tryPairLocalDirectionalCovariance (const TrainingKernelGeometry &geom, const Eigen::VectorXd &indices, const Eigen::VectorXd &direction, EigenMatrix &first, EigenMatrix &second, int rank=0, int ranks=1) const |
| double | evaluateLocalLooGeometryTerm (const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, const gpr::FieldMatrixd &geom_dist, Eigen::Index i, Eigen::Index n_geom, Eigen::Index n_blocks, double total_sigma2, Eigen::VectorXd *parameter_gradient=nullptr) |
| double | evaluateLocalNeighborhoodLooObjective (const Eigen::VectorXd &w, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, Eigen::VectorXd *gradient) |
| bool | failedOptim () const noexcept |
| std::size_t | nonfiniteMarginalLikelihoodRejections () const noexcept |
| bool | isDecomposedSuccessfully () const noexcept |
| const Observation & | fittedObservations () const noexcept |
| The observations the current posterior is fitted on. | |
| void | extractCoordinatesByIndex (const EigenMatrix &x, const Eigen::VectorXd &ind_Ddim, const Index_t ind, FieldMatrixd &x_loc) const |
| Extract coordinates from x using value ind from ind_Ddim. | |
| void | assignBlockToMatrix (const Eigen::VectorXd &ind_Ddim1, const Eigen::VectorXd &ind_Ddim2, const Index_t row_val, const Index_t col_val, const FieldMatrixd &field, EigenMatrix &matrix, bool transpose_field=false) const |
| Assign field to matrix according to indices form ind_Ddim1 and ind_Ddim2. | |
| void | accumulateBlockContribution (const Eigen::VectorXd &ind_Ddim1, const Eigen::VectorXd &ind_Ddim2, const Index_t row_val, const Index_t col_val, const FieldMatrixd &field, const EigenMatrix &invC, const Eigen::VectorXd &b, double &trace_accum, double &quad_accum, bool transpose_field=false, bool accumulate_quad=true, double diagonal_nugget=0.0, EigenMatrix *trace_sink=nullptr) |
| Accumulate trace and quadratic-form contributions from one block. | |
| double | traceInverseProduct (const EigenMatrix &factor, const EigenMatrix &observation_order, const detail::RigidDeflationState *deflation_override=nullptr) const |
| tr(K^{-1} A) through the training factor. A is in observation order. | |
| void | removeColumn (const Index_t column_ind, EigenMatrix &matrix) |
| Remove column from the dense matrix. | |
| Index_t | getNumberOfRepetitiveIndices (const Eigen::VectorXd &ind_Ddim) const |
| Count number of the first repetitive indices in ind_Ddim . | |
| virtual void | calculateVariance (Observation &image1) |
| Compute predictive variance for energy and gradient. Corresponds to MATLAB get_variance.m. | |
| bool | tryGateEnergyVariance (const Observation &query, Eigen::RowVectorXd &energy_variance) |
| bool | tryGateEnergyVarianceInterval (const Observation &query, Eigen::RowVectorXd &energy_variance_lower, Eigen::RowVectorXd &energy_variance_upper) |
| bool | canCertifyEnergyVarianceInterval () const |
| bool | tryBorderedNoiseReport (BorderedNoiseReport &report) const |
| virtual void | refreshVariancePrefactor (const Eigen::VectorXd &) |
| Hook called inside calculateVarianceLaplace at each CCD grid point, right after calculateMeanPrediction (so b := L^{-1} y is valid) and before calculateVariance(scratch_var). Purpose: let subclasses refresh any hyperparameter-dependent cached scalar that their override of calculateVariance consumes. | |
| virtual double | localVariancePrefactor (const Eigen::VectorXd &, const Eigen::VectorXd &) const |
| virtual double | localVariancePrefactorFromQuadratic (const Eigen::VectorXd &, double) const |
| bool | evaluateDirectionalCurvature (const Eigen::VectorXd &x_ind, const EigenMatrix &x, const Eigen::VectorXd &y, const Eigen::VectorXd &direction, double &curvature, const TrainingKernelGeometry *training_geom=nullptr) |
| Evaluate the exact directional curvature p^T H p for the current GP objective state. | |
| bool | evaluateNlmlHessianVector (const Eigen::VectorXd &x_ind, const EigenMatrix &x, const Eigen::VectorXd &y, const Eigen::VectorXd &direction, Eigen::VectorXd &product, const TrainingKernelGeometry *training_geom=nullptr) |
| Exact Hessian-vector product of the negative log marginal likelihood, including the covariance-function prior. | |
| bool | assembleExactHessian (const Eigen::VectorXd &x_ind, const EigenMatrix &x, const Eigen::VectorXd &y, int n_hyperparameters, Eigen::MatrixXd &H) |
| Assemble the full p x p observed-information Hessian of the negative log marginal likelihood at the current hyperparameters. | |
| bool | assembleHessianInDirections (const Eigen::VectorXd &x_ind, const EigenMatrix &x, const Eigen::VectorXd &y, const Eigen::MatrixXd &directions, Eigen::MatrixXd &H) |
| bool | fittedHyperparameterInformation (Eigen::MatrixXd &information, Eigen::MatrixXd &directions) |
| void | setRetainFittedHyperparameterDensity (bool retain) noexcept |
| bool | retainsFittedHyperparameterDensity () const noexcept |
| bool | assembleExactHessianLocalDense (const Eigen::VectorXd &x_ind, const EigenMatrix &x, const Eigen::VectorXd &y, int n_hyperparameters, Eigen::MatrixXd &H) |
| void | updateModelWithFullData (const Observation &full_observation) |
| void | updateConfiguration (const AtomsConfiguration &conf_info) |
| Update the internal atoms configuration. Use this when the set of active/frozen atoms changes dynamically. | |
| void | setUsePrecisionMatrix (bool use) |
| bool | usePrecisionMatrix () const noexcept |
| const AtomsConfiguration & | getAtomsConfig () const |
| void | calculatePotentialSVGD (Observation &image1) |
| void | calculateVarianceSVGD (Observation &image1) |
| void | calculatePotentialBMA (Observation &image1) |
| void | calculateVarianceBMA (Observation &image1) |
| void | evaluateEnergyAndGradientLocal (const Eigen::VectorXd &w, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, EnergyAndGradient &energy_and_gradient) |
| void | setSVGDConfig (const laplace::SteinVariationalConfig &cfg) noexcept |
| const laplace::SteinVariationalConfig & | getSVGDConfig () const noexcept |
Public Attributes | |
| std::unique_ptr< SexpatCF > | sexpat_cov_func |
Protected Member Functions | |
| void | calculatePosteriorMeanPrediction () |
| Calculate posterior mean prediction w.r.t energy. This function mimics the following step from the MATLAB code: a = L'(L[E_all;G_all(:)]);. | |
| void | calculatePosteriorMeanPrediction (const Eigen::VectorXd &y) |
| void | calculateMeanPrediction (const Eigen::VectorXd &y) |
| Posterior mean prediction w.r.t energy. This function mimics the following step from the MATLAB code: b = L[E_all;G_all(:)];. | |
| virtual void | evaluateGradient (const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, Eigen::VectorXd &gradient) |
| Evaluate the gradient of energy (GP_E) for Gaussian Process. | |
| void | evaluateGradientWithGeometry (const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, Eigen::VectorXd &gradient, const TrainingKernelGeometry *training_geom) |
| Eigen::Index | covarianceParameterCount () const |
| bool | currentThetaIncludesLikelihoodNoise () const noexcept |
| void | prepareTrainingPermutation (const Eigen::VectorXd &x_ind) |
| void | prepareTrainingPermutationLocal (const Eigen::VectorXd &x_ind) |
| EigenMatrix | permuteTrainingRows (const EigenMatrix &input) const |
| Eigen::VectorXd | permuteTrainingVector (const Eigen::VectorXd &input) const |
| Eigen::VectorXd | unpermuteTrainingVector (const Eigen::VectorXd &input) const |
| std::pair< double, double > | rigidNoiseDerivatives (const Eigen::VectorXd &direction) const |
| virtual double | evaluateEnergy (const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y) |
| Evaluate the energy function (un-normalized negative log marginal posterior). | |
| virtual double | hyperparameterDataTermScale () const |
| virtual void | recordHyperparameterDataTerm (double, double) |
| virtual bool | hyperparameterEnergyIsGaussian () const |
| bool | decomposeCovarianceMatrix (const EigenMatrix &x, const Eigen::VectorXd &x_ind) |
| Evaluate and decompose the covariance matrix using Cholesky decomposition. | |
| bool | decomposeForFittedTargets () |
| Factor the fitted design at the current hyperparameters and leave the posterior weights those of the fitted targets. | |
| bool | buildLaplaceTrainingCovarianceGeometry (const EigenMatrix &x, const Eigen::VectorXd &x_ind, LaplaceTrainingCovarianceGeometry &geometry) const |
| bool | assembleLaplaceTrainingCovarianceFromGeometry (const LaplaceTrainingCovarianceGeometry &geometry, const Eigen::VectorXd &theta, EigenMatrix &cov_matrix) const |
| linalg::BackendContext & | backend () const |
| linalg::linop::DenseCholeskySolver | trainingSolver () const |
| void | retainTrainingCholeskyFactor () |
| void | releaseTrainingKokkosFactor () |
| void | clearTrainingCholeskyFactor () |
| bool | canUseDevicePosterior () const |
| bool | hasDevicePosterior () const noexcept |
| std::optional< double > | conditionDevicePosterior (const EigenMatrix &rows, const Eigen::VectorXd &indices, const Eigen::VectorXd &targets, bool placeholder_targets=false) |
| bool | devicePosteriorGradient (Eigen::VectorXd &gradient) |
| bool | predictDevicePosterior (Observation &image, bool variance) |
| void | refreshDeviceVarianceCalibration () |
| void | materializeDeviceFactor () const |
| void | materializeDeviceAlpha () const |
| void | planObjectiveBackend (const EigenMatrix &x, const Eigen::VectorXd &y) |
| Update the plan from the dense factor just formed at this order. | |
| std::optional< Eigen::VectorXd > | krylovAddedDiagonal (const EigenMatrix &x) |
| std::optional< double > | evaluateKrylovObjective (const Eigen::VectorXd &constant_update, const EigenMatrix &x, const Eigen::VectorXd &y) |
| void | evaluateKrylovGradient (const EigenMatrix &x, const Eigen::VectorXd &x_ind, Eigen::VectorXd &gradient, const TrainingKernelGeometry *training_geom) |
| Eigen::VectorXd | objectiveParameterStamp () const |
| Observation | selectOptimizationSubset (const Observation &full_observation) const |
| Select a hyperparameter-optimization subset via FPS-EMD. | |
| std::vector< int > | selectOptimizationSubsetRows (const Observation &full_observation) const |
| Select a hyperparameter-optimization subset via FPS-EMD. | |
| void | captureFittedHyperparameterDensity (const Coord &positions, const Eigen::VectorXd &targets, const Eigen::VectorXd &theta, const funcmin::MapObjectiveConfig &penalty, double target_scale, bool use_ties) |
| OptimizationObjectiveFrame | enterOptimizationObjectiveFrame (Eigen::VectorXd &targets, Eigen::Index energy_count, Eigen::VectorXd *theta) |
| void | leaveOptimizationObjectiveFrame (const OptimizationObjectiveFrame &frame, Eigen::VectorXd *theta) noexcept |
| Eigen::VectorXd | performHyperparameterOptimization (const Observation &opt_observation) |
| bool | canUseTrainingGeometryObjective () const noexcept |
| void | optimizeLaplaceINLA (const Observation &observation) |
| double | inlaMaxLogMagnSigma2 (const EigenMatrix &x, const Eigen::VectorXd &y, const Eigen::VectorXd &theta_seed) const |
| void | calculateInlaModeLogBounds (const Eigen::VectorXd &theta_seed, double min_lengthscale, double max_log_magn_sigma2, Eigen::VectorXd &lower, Eigen::VectorXd &upper) const |
| double | inlaMinimumLengthScale (double range_x) const |
| bool | computeInlaPosteriorMode (const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y, Eigen::VectorXd &theta_mode, const TrainingKernelGeometry *training_geom) |
| double | evaluateEnergyLocalOnly (const Eigen::VectorXd &w, const EigenMatrix &x, const Eigen::VectorXd &x_ind, const Eigen::VectorXd &y) |
| bool | monitorAndAdaptHyperparameters (const Eigen::VectorXd &new_parameters) |
| Monitors hyperparameter history for oscillations and adapts the FPS history size. | |
| void | extendTrainingInverseDiagonal (Eigen::Index old_order, Eigen::Index new_order) |
| const Eigen::VectorXd & | trainingInverseDiagonalInFactorLayout () const |
| Eigen::VectorXd | trainingCholeskyDiagonal () const |
| virtual bool | supportsRigidNullDeflation () const noexcept |
| Eigen::Index | activeFactorOrder (Eigen::Index full_rows) const noexcept |
| bool | tryDeflateFactorSignalCovariance (const EigenMatrix &x_ordered, const Eigen::VectorXd &ind_ordered, const Eigen::VectorXd &noise_ordered, double extra_uniform_noise, EigenMatrix &signal_cov, const Eigen::VectorXd &constant_update, Eigen::VectorXd &factor_constant, bool factor_order=true) |
Static Protected Member Functions | |
| static int | chooseFarthestPointDeterministic (const std::vector< std::pair< int, double > > &candidate_distances, double tolerance=1e-12) |
| static bool | computePairtypeDescriptorScale (const Coord &R, const AtomsConfiguration &conf_info, Eigen::VectorXd &ls_k) |
| Per-pairtype motion scale rho0_k = sqrt(sum_f var(1/r_f)). Each pair feature is centered across configurations before summing its variance within InverseDistanceDescriptor::featurePairtypes groups. Units are inverse Angstrom. These scales seed SExpAt and anchor the MAP length-scale prior (MapObjectiveConfig::lengthscale_rho0). | |
Friends | |
| class | tests::GaussianProcessRegressionTest |
| template<class Inner> | |
| struct | detail::TiedLengthScaleObjective |
| PublicLayoutBytes | libraryPublicLayout () |
| PublicLayoutBytes | consumerPublicLayout () |
Definition at line 335 of file GaussianProcessRegression.h.
Definition at line 1255 of file GaussianProcessRegression.h.
Definition at line 1257 of file GaussianProcessRegression.h.
|
strong |
| Enumerator | |
|---|---|
| Invalid | |
| Unchanged | |
| Updated | |
| Rebuilt | |
Definition at line 1048 of file GaussianProcessRegression.h.
|
strong |
Outcome of one mean-Hessian source. Unavailable means another source may answer. Refused means this source owns the product and declines it. Computed means the product was written.
| Enumerator | |
|---|---|
| Unavailable | |
| Refused | |
| Computed | |
Definition at line 1230 of file GaussianProcessRegression.h.
|
strong |
Agreement between measured rows and the current posterior.
| Enumerator | |
|---|---|
| Unmeasurable | |
| Consistent | |
| Contradicted | |
Definition at line 512 of file GaussianProcessRegression.h.
|
strong |
| Enumerator | |
|---|---|
| NotApplicable | |
| Refused | |
| Computed | |
Definition at line 1246 of file GaussianProcessRegression.h.
|
strong |
Backend of the hyperparameter objective and gradient. Auto takes the Krylov backend when its operation count, planned from the pivot residual of the last dense factor at this training order, the noise floor and the fit tolerances, undercuts the dense factor.
| Enumerator | |
|---|---|
| Auto | |
| Dense | |
| Krylov | |
Definition at line 2574 of file GaussianProcessRegression.h.
|
strong |
Which posterior variance the model reports. Predictive is the classic get_variance.m definition (prior from the training covariance, so the likelihood nugget is included). Latent removes the likelihood diagonal and reports the variance of the latent function, the quantity an acquisition compares against the nugget; the stable-basis dual path always builds its prior from the kernel alone, so Latent makes every backend agree.
| Enumerator | |
|---|---|
| Predictive | |
| Latent | |
Definition at line 2996 of file GaussianProcessRegression.h.
| gpr::GaussianProcessRegression::GaussianProcessRegression | ( | ) |
Definition at line 97 of file GaussianProcessRegression.cpp.
|
explicit |
Definition at line 206 of file GaussianProcessRegression.cpp.
|
virtualdefault |
| void gpr::GaussianProcessRegression::accumulateBlockContribution | ( | const Eigen::VectorXd & | ind_Ddim1, |
| const Eigen::VectorXd & | ind_Ddim2, | ||
| const Index_t | row_val, | ||
| const Index_t | col_val, | ||
| const FieldMatrixd & | field, | ||
| const EigenMatrix & | invC, | ||
| const Eigen::VectorXd & | b, | ||
| double & | trace_accum, | ||
| double & | quad_accum, | ||
| bool | transpose_field = false, | ||
| bool | accumulate_quad = true, | ||
| double | diagonal_nugget = 0.0, | ||
| EigenMatrix * | trace_sink = nullptr ) |
Accumulate trace and quadratic-form contributions from one block.
Adds the contribution of the logical block matrix(ind_Ddim1 == row_val, ind_Ddim2 == col_val) = field to trace_accum += tr(invC * dK_block) quad_accum += b^T dK_block b without materializing the full dK matrix.
Hutchinson option: when trace_probe_W and trace_probe_Z are supplied (both N x m), the trace term is accumulated as the un-normalized stochastic estimator sum_j (W_block.col(j))^T dK_block (Z_block.col(j)) instead of the exact tr(invC * dK_block). Summed over all blocks this gives sum_j w_j^T dK z_j; the caller divides the per-hyperparameter accumulator by m to obtain the Hutchinson estimate of tr(K^-1 dK) when w_j = K^-1 z_j. The quadratic (alpha / alpha-K) term is identical in both modes – only the trace term changes – so the estimator never perturbs the data-fit gradient.
Definition at line 2713 of file CovarianceAssembly.cpp.
| void gpr::GaussianProcessRegression::accumulateCrossCovarianceMatVecLocal | ( | const EigenMatrix & | x1, |
| const EigenMatrix & | x2, | ||
| const Eigen::VectorXd & | ind_Ddim, | ||
| const Eigen::VectorXd & | uDdim, | ||
| const Eigen::VectorXd & | ind_Ddim2, | ||
| const Eigen::VectorXd & | uDdim2, | ||
| CovFunc & | cov_func, | ||
| const Eigen::VectorXd & | weights, | ||
| Eigen::VectorXd & | output, | ||
| bool | do_reduce = true, | ||
| bool | select_prediction_product = false ) const |
Accumulate local K(x1, x2)^T * weights contributions without materializing the full cross-covariance matrix.
This follows the same block ownership scheme as applyCrossCovarianceFunction() but contracts each owned block directly against the relevant segment of weights.
Public so numerical-equivalence tests can call it via a helper free function without friend gymnastics; those tests gate alpha-K changes on bit-equivalence vs the dense KK^T * alpha reference.
Definition at line 347 of file GaussianProcessRegression.inl.
| bool gpr::GaussianProcessRegression::activateMaterializedPosterior | ( | ) |
Reactivate a materialized posterior without rebuilding its joint energy-gradient covariance. Eigen factors and HS-SVD posteriors are already object-local; ScaLAPACK factors are restored into its solve slot.
Definition at line 313 of file Decompose.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2759 of file GaussianProcessRegression.h.
|
inlinenodiscardprotectednoexcept |
Definition at line 5576 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Anchors the last active correction fit conditioned its candidate objectives on (every anchor when the background has no more rows than its own fit subset).
Definition at line 628 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
MAP objective at the start of the last active correction fit.
Definition at line 621 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Anchors used to condition the selected correction after its support expands beyond the hyperparameter fit subset.
Definition at line 634 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 616 of file GaussianProcessRegression.h.
|
nodiscardnoexcept |
Definition at line 958 of file ActivePosterior.cpp.
|
inlinenodiscardnoexcept |
Definition at line 577 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 599 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::addLayeredPriorHessianAction | ( | const Eigen::VectorXd & | position, |
| const Eigen::VectorXd & | direction, | ||
| Eigen::VectorXd & | action ) const |
H_prior(x) v + H_q v, with either term absent when that mean is off.
Definition at line 891 of file GaussianProcessRegression.cpp.
|
nodiscard |
Append to a fitted posterior at fixed hyperparameters. The existing Cholesky factor must be appendable; otherwise this returns false without rebuilding or optimizing.
Definition at line 1101 of file Optimize.cpp.
|
inline |
Definition at line 2872 of file GaussianProcessRegression.h.
|
inlinenodiscard |
Definition at line 2865 of file GaussianProcessRegression.h.
| bool gpr::GaussianProcessRegression::applyLikelihoodNoiseVarianceFloor | ( | double | floor_sigma2, |
| const Observation & | full_observation ) |
Raise the Gaussian likelihood noise variance to a floor.
A valid likelihood variance above the floor is preserved. Its physical mirror is synchronized through setLikelihoodNoiseVariance when needed.
| floor_sigma2 | Minimum likelihood variance in physical output sigma^2 units. |
| full_observation | Full training observation used to rebuild noise-dependent model state after a change. |
Definition at line 357 of file GaussianProcessRegression.cpp.
|
nodiscard |
Definition at line 1788 of file Decompose.cpp.
|
nodiscard |
Definition at line 1701 of file Decompose.cpp.
| void gpr::GaussianProcessRegression::applyPopulationPrior | ( | const AtomsConfiguration & | conf_info, |
| const Eigen::VectorXd & | ls_k, | ||
| double | own_s2_log ) |
Anchor the pair types the population has seen in the kernel's prior (log-Gaussian at the population's location and width); ~ls_k~ is the run's own scale per pair type and ~own_s2_log~ the run's own width (zero when it has none).
Definition at line 1357 of file GaussianProcessRegression.cpp.
|
nodiscard |
Derivative tensors dC/dtheta_j of the composite joint covariance under a manifold chart, ordered as SexpatCF::combineParameters (log magnSigma2, then log lengthScale entries; only entry (0,0) enters the chart kernel).
Definition at line 1050 of file CovarianceAssembly.cpp.
|
nodiscard |
Definition at line 1112 of file CovarianceAssembly.cpp.
|
nodiscard |
Second directional derivative of the charted joint covariance along a hyperparameter direction p = (p_u, p_v, ...) in the combineParameters order (log magnitude, log length scale): C_pp = p_u^2 K + 2 p_u p_v K_v + p_v^2 K_vv, since the log-magnitude derivative of every block is the block itself.
Definition at line 1149 of file CovarianceAssembly.cpp.
|
nodiscard |
Definition at line 1074 of file CovarianceAssembly.cpp.
|
inline |
Assemble the directional first and second derivatives of the training covariance matrix for the optimized Sexpat parameters.
Public + const so that out-of-class callers (e.g. laplace::TCovSecondOrder) can request directional kernel derivatives without needing friend access; promoted from private for that purpose.
Definition at line 2627 of file GaussianProcessRegression.inl.
|
inlinenodiscard |
Definition at line 2760 of file GaussianProcessRegression.inl.
| bool gpr::GaussianProcessRegression::assembleExactHessian | ( | const Eigen::VectorXd & | x_ind, |
| const EigenMatrix & | x, | ||
| const Eigen::VectorXd & | y, | ||
| int | n_hyperparameters, | ||
| Eigen::MatrixXd & | H ) |
Assemble the full p x p observed-information Hessian of the negative log marginal likelihood at the current hyperparameters.
Uses the evaluateDirectionalCurvature oracle plus the polarisation identity validated symbolically in python/tests/test_sympy_laplace.py::test_polarisation_identity_recovers_off_diagonal:
H(i,i) = e_i^T H e_i (p direct calls) H(i,j) = ( (e_i+e_j)^T H (e_i+e_j)
Total: p(p+1)/2 directional oracle calls, each of which reuses the cached Cholesky factor L and alpha. Symmetrised on the way out.
| x_ind | unique-index vector (same semantics as evaluateDirectionalCurvature). |
| x | training input matrix. |
| y | training targets. |
| n_hyperparameters | p – length of the hyperparameter vector the directional oracle is parameterised by (the direction argument to evaluateDirectionalCurvature has this length). |
| H | [out] p x p observed Hessian. Resized to (p, p) on successful return. |
Definition at line 568 of file Hessian.cpp.
| bool gpr::GaussianProcessRegression::assembleExactHessianLocalDense | ( | const Eigen::VectorXd & | x_ind, |
| const EigenMatrix & | x, | ||
| const Eigen::VectorXd & | y, | ||
| int | n_hyperparameters, | ||
| Eigen::MatrixXd & | H ) |
Definition at line 945 of file Hessian.cpp.
| bool gpr::GaussianProcessRegression::assembleHessianInDirections | ( | const Eigen::VectorXd & | x_ind, |
| const EigenMatrix & | x, | ||
| const Eigen::VectorXd & | y, | ||
| const Eigen::MatrixXd & | directions, | ||
| Eigen::MatrixXd & | H ) |
Assemble J^T H J directly from the columns of J, without probing directions excluded by the parameter constraints.
Definition at line 581 of file Hessian.cpp.
|
inlinenodiscard |
The dual-kernel cross covariance and prior diagonal that the HS-SVD variance routes contract; energy_only selects the energy columns the energy gate reads.
Definition at line 3078 of file GaussianProcessRegression.h.
|
inlinenodiscard |
Definition at line 3063 of file GaussianProcessRegression.h.
|
inlinenodiscard |
Definition at line 3085 of file GaussianProcessRegression.h.
|
nodiscardprotected |
Definition at line 278 of file LaplacePosterior.cpp.
| void gpr::GaussianProcessRegression::assignBlockToMatrix | ( | const Eigen::VectorXd & | ind_Ddim1, |
| const Eigen::VectorXd & | ind_Ddim2, | ||
| const Index_t | row_val, | ||
| const Index_t | col_val, | ||
| const FieldMatrixd & | field, | ||
| EigenMatrix & | matrix, | ||
| bool | transpose_field = false ) const |
Assign field to matrix according to indices form ind_Ddim1 and ind_Ddim2.
This function performs the following operation (in MATLAB form):
\[ matrix(ind_Ddim == row_val, ind_Ddim == col_val) = field; \]
| ind_Ddim1 | Vector of dimensions used in rows |
| ind_Ddim2 | Vector of dimensions used in columns |
| row_val | Index of row |
| col_val | Index of column |
| field | Reference field |
| matrix | Reference matrix |
| transpose_field | True if the field should be transposed |
Definition at line 2692 of file CovarianceAssembly.cpp.
|
nodiscard |
Definition at line 273 of file AtomicEnvironment.cpp.
|
inlinenodiscardnoexcept |
Definition at line 447 of file GaussianProcessRegression.h.
|
nodiscard |
Definition at line 281 of file AtomicEnvironment.cpp.
|
nodiscard |
Definition at line 253 of file AtomicEnvironment.cpp.
|
inlinenodiscardprotected |
Definition at line 5285 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2768 of file GaussianProcessRegression.h.
|
nodiscardprotected |
Definition at line 178 of file LaplacePosterior.cpp.
| void gpr::GaussianProcessRegression::buildRFFModel | ( | const Observation & | training_data, |
| int | D_rff ) |
Random Fourier Features (RFF) layered predict path. Approximates the SE kernel with D_rff random cosine features, then solves Bayesian linear regression in the feature space. Per-call predict cost drops from O(N (D+1)) (cached MAP cross-cov + matvec) to O(D_rff D) (constant in N). Layered ON TOP of the LAPLACE_SLICE + INLA-Delta variance: the RFF mean replaces the cheap-mean MAP path; INLA-Delta still provides the calibrated variance for the gate. D_rff = 0 disables RFF (default; bit-identical to main).
Definition at line 17 of file RFF.cpp.
| void gpr::GaussianProcessRegression::calculateBackgroundObservationPosteriorCrossCovariance | ( | const EigenMatrix & | left, |
| const EigenMatrix & | right, | ||
| EigenMatrix & | covariance, | ||
| const Eigen::VectorXd * | mean_weights = nullptr ) |
Posterior cross covariance of the joint channels of left against right, or its contraction with mean_weights; public for the tests of the subset-conditioned posterior.
Definition at line 905 of file Variance.cpp.
|
nodiscard |
Directional curvature v^T H_mu(R) v of the posterior mean. True when the contraction is analytic. Exactness is KernelOperator::meanCurvature. A pullback is Exact when its chart provides a directional Jacobian, a conditioned kernel reports its child (so conditioned geodesic heat is Exact), and a sum is Exact only when every summand is. That classification also admits an inverse-distance Sexpat mean, an exact active-posterior background and residual, and a spectral block. A mean that is not Exact, and an exact operator that refuses the query, returns false and leaves curvature NaN. The predicted-gradient stencil is not a substitute.
Definition at line 2940 of file ActivePosterior.cpp.
|
protected |
Definition at line 180 of file INLA.cpp.
|
inline |
Definition at line 3037 of file GaussianProcessRegression.h.
|
nodiscard |
Weighted sum of exact pair-kernel Hessian-vector products at the cached Laplace factors, including the block-assembled mean. NotApplicable when the predictive mean is not that mixture. Refused when the mixture is the mean and a factor contraction fails.
Definition at line 1223 of file LaplacePosterior.cpp.
|
nodiscard |
Dense Hessian of the physical posterior mean at one geometry.
The sources are tried in this order. An active posterior whose background and residual are both exact assembles their matrices, and a refusal is final. Otherwise, outside an atomic environment or an active posterior, a prepared HS-SVD block applied to the identity is the matrix, before any exact MAP kernel is consulted; a failed apply returns false and leaves the matrix empty, and the action columns and the stencil are not substitutes. When that block is not prepared, the MAP kernel assembles its matrix from its refusal-aware action. A refusal by an exact term is final. A generic term without an analytic contraction is not a refusal: the matrix is then the columns of prepareMeanHessian(R), whose generic miss uses the stencil of the mean gradient.
Definition at line 2845 of file ActivePosterior.cpp.
|
nodiscard |
Differentiate the physical posterior mean. The HS-SVD product is tried before the exact MAP preparation, which runs only when that product is unavailable. A prepared HS-SVD block that does not apply is a refusal, the same as the dense matrix, and is not replaced by the exact MAP kernel or the fourth-order Cartesian stencil. An exact MAP preparation that is empty or returns false is then a refusal and is not replaced by the stencil. A mean with no analytic contraction still uses the stencil.
Definition at line 3086 of file ActivePosterior.cpp.
|
nodiscard |
Definition at line 1306 of file Decompose.cpp.
|
protected |
Posterior mean prediction w.r.t energy. This function mimics the following step from the MATLAB code: b = L[E_all;G_all(:)];.
Definition at line 688 of file Predict.cpp.
|
nodiscard |
Force-variance reduction from a complete energy-gradient query. Active residuals evaluate one target geometry at a time, preserving the full posterior and the background's joint query subset.
Definition at line 3462 of file ActivePosterior.cpp.
|
nodiscard |
Latent variance of a linear energy-gradient observation in physical units. Weights use the joint channel order above. A configured variance subset matches the joint covariance; otherwise contraction precedes the global posterior solve. Reporting noise and calibration are absent.
Definition at line 1100 of file Variance.cpp.
|
nodiscard |
Physical Gaussian measurement variance, including jitter, in the joint energy-gradient channel order used for sequential conditioning.
Definition at line 550 of file Variance.cpp.
| void gpr::GaussianProcessRegression::calculateObservationPosteriorCovariance | ( | const EigenMatrix & | positions, |
| EigenMatrix & | K_post, | ||
| bool | allow_hssvd_local = true ) |
Compute the latent joint posterior covariance of energy and gradient channels at query positions in physical output units. Channel order matches Observation: energies for every query, followed by each gradient column.
Definition at line 1082 of file Variance.cpp.
|
protected |
Calculate posterior mean prediction w.r.t energy. This function mimics the following step from the MATLAB code: a = L'(L[E_all;G_all(:)]);.
Definition at line 153 of file Predict.cpp.
|
protected |
Definition at line 167 of file Predict.cpp.
| void gpr::GaussianProcessRegression::calculatePotential | ( | Observation & | image1 | ) |
Calculate potential within GPR model.
This auxiliary function calculates energy and gradient predictions for given images R according to a GPR model.
| image1 | Observation at image 1 |
Definition at line 713 of file Predict.cpp.
| void gpr::GaussianProcessRegression::calculatePotentialBatch | ( | std::vector< Observation * > | queries | ) |
One dispatched mean predict for B same-composition queries. Stacks the query rows, assembles one cross-covariance, writes each query's energy and gradient. Empty or mixed-D lists are a no-op. Sequential calculatePotentialDispatched on the same queries must match.
Definition at line 1132 of file Predict.cpp.
| void gpr::GaussianProcessRegression::calculatePotentialBMA | ( | Observation & | image1 | ) |
Bayesian Model Averaging gold-standard reference predict and variance. Marginalises the predictive distribution over a 2D log10 grid (lengthScale x noise_var) weighted by the posterior p(theta_k | D) ~ exp(-NLML(theta_k)). Routed via calculatePotentialDispatched / calculateVarianceDispatched when –uncertainty-mode=bma. The grid is fitted from scratch on each call (no cache); per-call cost is n_grid noiseless Cholesky decompositions, intentionally heavier than LAPLACE since BMA is the validation reference for the LAPLACE mixture.
Definition at line 121 of file BMA.cpp.
| void gpr::GaussianProcessRegression::calculatePotentialDispatched | ( | Observation & | image1 | ) |
Dispatched predict: routes to calculatePotential (MAP) or calculatePotentialLaplace based on uncertainty_mode_. This is what AtomicDimer / GPNEB should call; the explicit non-dispatched methods stay available for direct use (e.g. tests).
Definition at line 982 of file Predict.cpp.
| void gpr::GaussianProcessRegression::calculatePotentialLaplace | ( | Observation & | image1 | ) |
Laplace-mixture-mean potential prediction (INLA, Rue et al. 2009).
Equivalent to calculatePotential in API – writes into image1.E and image1.G – but the predictive mean is the weighted-mixture mean over the CCD grid centred at the current MAP hyperparameters. The posterior factor state is keyed by the training-state stamp; query coordinates do not enter that stamp.
Falls back to the standard calculatePotential if any precondition fails (Hessian non-PD, directional oracle refuses, training data absent). Always safe to call.
Definition at line 1341 of file LaplaceSlice.cpp.
| void gpr::GaussianProcessRegression::calculatePotentialLaplaceSlice | ( | Observation & | image1 | ) |
Slice-sampling Laplace marginalisation (UncertaintyMode:: LAPLACE_SLICE). Caches M = slice_laplace_opts_.n_samples posterior samples (theta_k, alpha_k = K(theta_k)^-1 y) on the first call after a training-data or theta_* change, then averages per-sample mean predictions across the cache. No new Cholesky on hot calls; per-call cost is O(M * n_train * n_query). Falls back to MAP if the slice burst fails (signature-invalid, NaN initial log-target, kernel state inconsistent). See Murray & Adams 2010 NIPS, arxiv 1006.0868.
Definition at line 752 of file LaplaceSlice.cpp.
| void gpr::GaussianProcessRegression::calculatePotentialRFF | ( | Observation & | image | ) |
Definition at line 58 of file RFF.cpp.
| void gpr::GaussianProcessRegression::calculatePotentialSVGD | ( | Observation & | image1 | ) |
SVGD particle posterior predict + variance. Routed via calculatePotentialDispatched / calculateVarianceDispatched when –uncertainty-mode=svgd.
Definition at line 87 of file SVGD.cpp.
|
virtual |
Compute predictive variance for energy and gradient. Corresponds to MATLAB get_variance.m.
Reimplemented in gpr::StudentTProcessRegression.
Definition at line 353 of file Variance.cpp.
| void gpr::GaussianProcessRegression::calculateVarianceBatch | ( | std::vector< Observation * > | queries | ) |
One dispatched variance predict for B same-composition queries.
Definition at line 1142 of file Predict.cpp.
| void gpr::GaussianProcessRegression::calculateVarianceBMA | ( | Observation & | image1 | ) |
Definition at line 133 of file BMA.cpp.
| void gpr::GaussianProcessRegression::calculateVarianceDispatched | ( | Observation & | image1 | ) |
Dispatched variance: calculateVariance (MAP) or calculateVarianceLaplace based on uncertainty_mode_. Dimer certificate consumers call this when both energy and force variance are required.
Definition at line 2000 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::calculateVarianceHssvd | ( | Observation & | image1 | ) |
Stable-basis posterior energy variance, consistent with the HS-SVD mean. var(x*) = k(x*,x*) - k*^T (K+sigma2 I)^{-1} k* via the eigen-form; inflates to magnSigma2 where x* leaves the training data, fixing the over-confidence of routing the mean through the stable basis while the variance still came from the Laplace/Cholesky path. Writes energy variance into image1.E (calculateVariance convention). Requires the serial factorize (A_train retained); callers fall back otherwise.
Definition at line 2266 of file Decompose.cpp.
| void gpr::GaussianProcessRegression::calculateVarianceLaplace | ( | Observation & | image1 | ) |
Laplace-mixture predictive variance (law of total variance over the CCD grid centred at theta*). Same shape contract as calculateVariance: writes per-test-point variance into image1.E (N_im scalars) and per-dim gradient variance into image1.G (N_im x D). Falls back to calculateVariance (MAP) if no Laplace fit can be built.
Definition at line 1196 of file LaplacePosterior.cpp.
| void gpr::GaussianProcessRegression::calculateVarianceLaplaceSlice | ( | Observation & | image1 | ) |
Variance counterpart to calculatePotentialLaplaceSlice. Reports the between-sample variance of the per-sample mean predictions (Var_theta[mu(theta; x*)]); the within-sample variance is left for a follow-up since it requires K^-1 k_cross per sample per query (one extra triangular solve each, doubling per-predict cost). The between-sample variance is the dominant component when the hyperparameter posterior is broad (which is the only regime where LAPLACE differs meaningfully from MAP), so the approximation is fit-for-purpose for the variance-gated acquisition path.
Definition at line 762 of file LaplaceSlice.cpp.
| void gpr::GaussianProcessRegression::calculateVarianceRFF | ( | Observation & | image | ) |
Definition at line 70 of file RFF.cpp.
| void gpr::GaussianProcessRegression::calculateVarianceSVGD | ( | Observation & | image1 | ) |
Definition at line 167 of file SVGD.cpp.
|
nodiscard |
Compare held-out true Cartesian gradients with the posterior force marginal. The scale is sqrt(mean(z^2)) for z=(F_true-F_mean)/sd=(G_mean-G_true)/sd and is not clipped or regularized.
Definition at line 1156 of file Optimize.cpp.
|
nodiscard |
Evaluate all training channels by closed-form leave-one-out prediction from the active posterior's inverse diagonal and weights.
Definition at line 1153 of file Predict.cpp.
|
nodiscard |
Whether tryGateEnergyVarianceInterval can certify this model: an exact-kernel HS-SVD MAP posterior with no replacement path active.
Definition at line 799 of file Variance.cpp.
|
nodiscardprotected |
Definition at line 290 of file DevicePosterior.cpp.
|
nodiscardprotectednoexcept |
Definition at line 389 of file Optimize.cpp.
|
protected |
Definition at line 771 of file LaplaceSlice.cpp.
|
staticprotected |
Definition at line 1524 of file Optimize.cpp.
| void gpr::GaussianProcessRegression::claimActiveTrainingCholeskyFactor | ( | ) |
Associate the live ScaLAPACK factor with this GP after a materialize.
Definition at line 358 of file Decompose.cpp.
|
noexcept |
Definition at line 185 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::clearGeodesicHeatPrior | ( | ) |
Remove the additive geodesic covariance and restore the configured base-kernel execution backend for hyperparameter fitting.
Definition at line 2222 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::clearHierarchicalPrior | ( | ) |
Disable the hierarchical prior set via ~setHierarchicalPrior~. Restores the flat prior path on the SExp kernel.
Definition at line 2080 of file GaussianProcessRegression.cpp.
|
inlinenoexcept |
Definition at line 565 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 561 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 545 of file GaussianProcessRegression.h.
|
noexcept |
Definition at line 825 of file GaussianProcessRegression.cpp.
|
protected |
Definition at line 243 of file Decompose.cpp.
|
protected |
Definition at line 234 of file INLA.cpp.
|
inlinenodiscard |
Definition at line 3052 of file GaussianProcessRegression.h.
|
nodiscard |
Compatibility wrapper for the Laplace skip-SCG API. Uses the current covariance-function parameter vector as the reference point.
Definition at line 3819 of file Optimize.cpp.
|
nodiscard |
Definition at line 3700 of file Optimize.cpp.
|
staticprotected |
Per-pairtype motion scale rho0_k = sqrt(sum_f var(1/r_f)). Each pair feature is centered across configurations before summing its variance within InverseDistanceDescriptor::featurePairtypes groups. Units are inverse Angstrom. These scales seed SExpAt and anchor the MAP length-scale prior (MapObjectiveConfig::lengthscale_rho0).
Definition at line 1351 of file GaussianProcessRegression.cpp.
|
nodiscard |
Condition the fitted full GP plus an independent active kernel on the appended rows of a cumulative observation history. The full-fit prefix must match exactly. Each call conditions on that suffix once, using the same frozen background. A null kernel gives sequential conditioning. Kernel outputs use physical energy-gradient covariance units.
Definition at line 1147 of file ActivePosterior.cpp.
|
protected |
Definition at line 298 of file DevicePosterior.cpp.
|
nodiscard |
Condition the quadrature on this model's rows without reweighting its hyperparameters by a likelihood already represented by the source. Requires the same parameter point, output units, noise and pair types. A charted kernel can restore its own quadrature but cannot transfer it to another model. Factors are built on the first integrated prediction. False leaves the current posterior unchanged.
Definition at line 166 of file HyperparameterPosterior.cpp.
| void gpr::GaussianProcessRegression::configureLengthScaleTies | ( | const AtomsConfiguration & | configuration | ) |
Definition at line 693 of file GaussianProcessRegression.cpp.
| bool gpr::GaussianProcessRegression::configureMinimumModeRefit | ( | const Observation & | oracle, |
| double | force_tolerance, | ||
| ConvergenceNormType | force_norm = ConvergenceNormType::L2_NORM, | ||
| const RefitTrustReport * | trust_report = nullptr ) |
Select the active lengths using the lowest eigenvector of the Cartesian mean Hessian at the least trusted acquired observation. Every acquired row must satisfy the force uncertainty and error tolerances; any untrusted row requests a full fit. One Hessian is formed for a trusted batch, at its maximum uncertainty/error witness. The maximum-atom RMS is sqrt(max_a trace(Cov(F_a))).
Definition at line 1876 of file Optimize.cpp.
| bool gpr::GaussianProcessRegression::configureModeRefit | ( | const Observation & | oracle, |
| const Coord & | mode, | ||
| double | force_tolerance, | ||
| ConvergenceNormType | force_norm = ConvergenceNormType::L2_NORM ) |
Restrict one refit using a minimum-mode estimate and an oracle force. Uncertain predictions and measured force errors request the full fit. Error and marginal force RMS use the caller's convergence norm.
Definition at line 1745 of file Optimize.cpp.
|
nodiscard |
Frobenius products with latent active-kernel parameter derivatives. Returns amplitude followed by the requested log lengths. Block owners reduce scalar products without storing full derivative matrices.
Definition at line 2050 of file CovarianceAssembly.cpp.
|
nodiscardprotected |
Definition at line 467 of file GaussianProcessRegression.cpp.
|
nodiscard |
Retain an existing, current quadrature without estimating a new one.
Definition at line 93 of file HyperparameterPosterior.cpp.
|
nodiscardprotectednoexcept |
Definition at line 480 of file GaussianProcessRegression.cpp.
|
protected |
Evaluate and decompose the covariance matrix using Cholesky decomposition.
Definition at line 3283 of file Decompose.cpp.
|
protected |
Factor the fitted design at the current hyperparameters and leave the posterior weights those of the fitted targets.
A device posterior is conditioned on placeholder zero targets by decomposeCovarianceMatrix; reading its weights before the fitted targets are set would give a zero mean and a zero Hessian.
Definition at line 3272 of file Decompose.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2613 of file GaussianProcessRegression.h.
|
nodiscard |
The whitened panel L^{-1} K(X, x*) and prior diagonal that the dense Cholesky marginal variance of positions reduces, built by the same assembly and triangular solve as calculateVariance.
Definition at line 483 of file Variance.cpp.
|
inlinenodiscard |
True when conditioning or an objective evaluation takes the device posterior, so host assembly counters and caches stay untouched.
Definition at line 2737 of file GaussianProcessRegression.h.
|
protected |
Definition at line 303 of file DevicePosterior.cpp.
|
inlinenodiscardnoexcept |
True while the resident device posterior holds the training factor. The host C, L and a are then empty until a reader materializes them.
Definition at line 2716 of file GaussianProcessRegression.h.
|
nodiscard |
Build the Laplace posterior if needed and mark every factor unusable, so that a mixture Hessian finds no factor to contract. False when no posterior can be built.
Definition at line 1214 of file LaplacePosterior.cpp.
|
inlinenodiscardnoexcept |
Rebuilds that appended to the cached distributed factor.
Definition at line 3290 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2975 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2985 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3146 of file GaussianProcessRegression.h.
|
inline |
Opt-in choice of the feature count. force_tol_fraction of 0 derives the fraction from the deployed gradient noise; any other value must lie in [0, 1). The default stays off, so a model that never calls this keeps the fixed-count path bit-identical.
Definition at line 2208 of file GaussianProcessRegression.h.
|
protected |
Definition at line 1548 of file Optimize.cpp.
|
inlinenodiscardnoexcept |
Definition at line 584 of file GaussianProcessRegression.h.
|
nodiscard |
Select derivative outputs independently of the active covariance's metric. The output contains amplitude followed by requested lengths.
Definition at line 2018 of file CovarianceAssembly.cpp.
|
nodiscard |
Latent energy-gradient covariance for an independent active correction. The supplied log parameters use the correction's output units. Inactive length scales have zero inverse-square weight; background parameters, noise and cached posterior factors remain owned by the fitted GP. Optional derivatives contain the log amplitude followed by active log lengths in parameter order; inactive derivative matrices are not formed.
Definition at line 2004 of file CovarianceAssembly.cpp.
| void gpr::GaussianProcessRegression::evaluateCovarianceMatrix | ( | const EigenMatrix & | x1, |
| const EigenMatrix & | x2, | ||
| const Eigen::VectorXd & | x1_ind, | ||
| const Eigen::VectorXd & | x2_ind, | ||
| EigenMatrix & | C, | ||
| bool | serial_per_rank = false ) const |
Evaluate covariance matrix between two input vectors.
Function takes in Gaussian process GP and two matrixes TX and X that contain input vectors to GP. Returns covariance matrix C. Every element ij of C contains covariance between inputs i in TX and j in X. PREDCF is an optional array specifying the indexes of covariance functions, which are used for forming the matrix. If empty or not given, the matrix is formed with all functions.
| x1 | First input vector |
| x1_ind | Observation type or derivative-channel indices for rows of x1 |
| x2 | Second input vector |
| x2_ind | Observation type or derivative-channel indices for rows of x2 |
| C | Covariance matrix |
| serial_per_rank | Assemble a complete local matrix without a collective reduction |
Definition at line 2494 of file CovarianceAssembly.cpp.
| bool gpr::GaussianProcessRegression::evaluateDirectionalCurvature | ( | const Eigen::VectorXd & | x_ind, |
| const EigenMatrix & | x, | ||
| const Eigen::VectorXd & | y, | ||
| const Eigen::VectorXd & | direction, | ||
| double & | curvature, | ||
| const TrainingKernelGeometry * | training_geom = nullptr ) |
Evaluate the exact directional curvature p^T H p for the current GP objective state.
Returns false when the current kernel parametrization cannot supply a backend-local exact directional derivative path, in which case callers should fall back to the finite-difference probe.
Definition at line 83 of file Hessian.cpp.
| double gpr::GaussianProcessRegression::evaluateEnergy | ( | const Eigen::VectorXd & | w, |
| const EigenMatrix & | x, | ||
| const Eigen::VectorXd & | x_ind, | ||
| const Eigen::VectorXd & | y ) |
Definition at line 366 of file EnergyGradient.cpp.
|
protectedvirtual |
Evaluate the energy function (un-normalized negative log marginal posterior).
This function takes a Gaussian process structure GP together with a matrix X of input vectors and a matrix Y of targets, and evaluates the energy function E. Each row of X corresponds to one input vector and each row of Y corresponds to one target vector.
The energy is minus log posterior cost function: E = EDATA + EPRIOR = - log p(Y|X, th) - log p(th), where th represents the parameters (lengthScale, magnSigma2...), X is inputs and Y is observations (regression) or latent values (non-Gaussian likelihood).
Note that this implements Algo 2.1 of Rasmussen and Williams but the variance is not computed, and the mean is not returned, so only the log marginal liklihood is caclulated and used directly to predict.
OPTIONS is optional parameter-value pair z - optional observed quantity in triplet (x_i,y_i,z_i) Some likelihoods may use this. For example, in case of Poisson likelihood we have z_i=E_i, that is, expected value for ith case.
| x | Matrix of coordinates |
| x_ind | Per-row observation channel indices, aligned with x |
| y | Vector of energy and gradients |
Reimplemented in gpr::StudentTProcessRegression.
Definition at line 423 of file EnergyGradient.cpp.
| void gpr::GaussianProcessRegression::evaluateEnergyAndGradient | ( | const Eigen::VectorXd & | w, |
| const EigenMatrix & | x, | ||
| const Eigen::VectorXd & | x_ind, | ||
| const Eigen::VectorXd & | y, | ||
| EnergyAndGradient & | energy_and_gradient ) |
Evaluate the energy function (un-normalized negative marginal log posterior) and its gradient.
This function takes a Gaussian process structure GP together with a matrix X of input vectors and a matrix Y of targets, and evaluates the energy function E and its gradient G. Each row of X corresponds to one input vector and each row of Y corresponds to one target vector.
The energy is minus log posterior cost function: E = EDATA + EPRIOR = - log p(Y|X, th) - log p(th), where th represents the parameters (lengthScale, magnSigma2...), X is inputs and Y is observations (regression) or latent values (non-Gaussian likelihood).
| w | Vector of combined parameters from covariance functions and likelihood |
| x | Training input vectors |
| x_ind | Per-row observation type or derivative-channel indices |
| y | Observed target values aligned with the rows of x |
| energy_and_gradient | Output energy and parameter gradient |
Definition at line 136 of file EnergyGradient.cpp.
| void gpr::GaussianProcessRegression::evaluateEnergyAndGradientFromGeometry | ( | const Eigen::VectorXd & | w, |
| const TrainingKernelGeometry & | geom, | ||
| const EigenMatrix & | x, | ||
| const Eigen::VectorXd & | x_ind, | ||
| const Eigen::VectorXd & | y, | ||
| EnergyAndGradient & | energy_and_gradient ) |
Definition at line 1150 of file EnergyGradient.cpp.
| void gpr::GaussianProcessRegression::evaluateEnergyAndGradientLocal | ( | const Eigen::VectorXd & | w, |
| const EigenMatrix & | x, | ||
| const Eigen::VectorXd & | x_ind, | ||
| const Eigen::VectorXd & | y, | ||
| EnergyAndGradient & | energy_and_gradient ) |
Local-only counterpart to evaluateEnergyAndGradient: every linear algebra step uses Eigen LLT on the rank's local heap rather than the ScaLAPACK collective Cholesky. Required by callers that want to evaluate the GP NLML at many hyperparameter samples in parallel across MPI ranks (each rank holds a different theta); a collective inside that loop would either deadlock or feed different matrices into the same global call.
Mutates rank-local kernel state via setParameters(w) the same way the distributed evaluator does; pair with ScopedKernelState at the call-site if the caller needs to restore (magn, ls, sigma2) after a sweep.
Does NOT touch member L, b, a, or C (the distributed Cholesky state); writes only into the caller-supplied energy_and_gradient out parameter.
Definition at line 197 of file EnergyGradient.cpp.
| double gpr::GaussianProcessRegression::evaluateEnergyFromGeometry | ( | const Eigen::VectorXd & | w, |
| const TrainingKernelGeometry & | geom, | ||
| const EigenMatrix & | x, | ||
| const Eigen::VectorXd & | x_ind, | ||
| const Eigen::VectorXd & | y ) |
Definition at line 592 of file EnergyGradient.cpp.
|
protected |
Definition at line 2351 of file GaussianProcessRegression.cpp.
|
protectedvirtual |
Evaluate the gradient of energy (GP_E) for Gaussian Process.
This function takes a full GP parameter vector W, GP structure GP, a matrix X of input vectors and a matrix Y of target vectors, and evaluates the gradient G of the energy function (gp_e). Each row of X corresponds to one input vector and each row of Y corresponds to one target vector.
| x | Matrix of coordinates |
| x_ind | Per-row observation type or derivative-channel indices |
| y | Vector of energy and gradients |
| gradient | Calculated new gradient |
Definition at line 2008 of file EnergyGradient.cpp.
|
nodiscard |
Gradient at the theta whose factor and kernel evaluateEnergy just built. A mismatched theta returns false so the caller recomputes both.
Definition at line 395 of file EnergyGradient.cpp.
|
nodiscard |
Definition at line 1196 of file EnergyGradient.cpp.
|
protected |
Definition at line 2033 of file EnergyGradient.cpp.
| void gpr::GaussianProcessRegression::evaluateHyperparameterObjectiveEnergyAndGradient | ( | const Eigen::VectorXd & | w, |
| const EigenMatrix & | x, | ||
| const Eigen::VectorXd & | x_ind, | ||
| const Eigen::VectorXd & | y, | ||
| EnergyAndGradient & | energy_and_gradient ) |
Compute the cached objective-stationarity skip predicate: ||H^{-1} g_new||, where H is an observed-information Hessian at the reference theta and g_new is the augmented-set NLML gradient evaluated at that same theta. Laplace, slice/PSIS, and MAP/SCG Hessian caches can supply H. Returns +infinity when no usable Hessian cache is available. Predicted Newton shift ||H^-1 g_new|| at theta_reference. The optional outputs return the shift vector, the objective and its gradient at theta_reference, so a caller can take the step. Energy and gradient of the objective the hyperparameters are actually fitted on: the leave-one-out objectives (through the training-geometry handle) when they are selected, the marginal likelihood otherwise. The stationarity test that decides whether a refit can be skipped must read this gradient; reading the marginal likelihood's under a LOO fit reported a large shift at every outer iteration and forced a full SCG refit each time.
Definition at line 3672 of file Optimize.cpp.
|
protected |
Gradient at the Krylov objective's parameters: its weights for the quadratic terms and its probes for every trace.
Definition at line 155 of file KrylovObjective.cpp.
|
nodiscardprotected |
The objective's data term through the Krylov backend, or nothing when the plan or the budget hands it to the dense factor.
Definition at line 105 of file KrylovObjective.cpp.
| void gpr::GaussianProcessRegression::evaluateLeaveOneOutEnergyAndGradientFromGeometry | ( | const Eigen::VectorXd & | w, |
| const TrainingKernelGeometry & | geom, | ||
| const EigenMatrix & | x, | ||
| const Eigen::VectorXd & | x_ind, | ||
| const Eigen::VectorXd & | y, | ||
| EnergyAndGradient & | energy_and_gradient ) |
Definition at line 1211 of file EnergyGradient.cpp.
|
nodiscard |
Definition at line 1700 of file EnergyGradient.cpp.
|
nodiscard |
Definition at line 1868 of file EnergyGradient.cpp.
| void gpr::GaussianProcessRegression::evaluateLocalNeighborhoodLooEnergyAndGradientFromGeometry | ( | const Eigen::VectorXd & | w, |
| const TrainingKernelGeometry & | geom, | ||
| const EigenMatrix & | x, | ||
| const Eigen::VectorXd & | x_ind, | ||
| const Eigen::VectorXd & | y, | ||
| EnergyAndGradient & | energy_and_gradient ) |
Definition at line 1984 of file EnergyGradient.cpp.
|
nodiscard |
Definition at line 1658 of file EnergyGradient.cpp.
|
nodiscard |
Definition at line 1875 of file EnergyGradient.cpp.
| bool gpr::GaussianProcessRegression::evaluateNlmlHessianVector | ( | const Eigen::VectorXd & | x_ind, |
| const EigenMatrix & | x, | ||
| const Eigen::VectorXd & | y, | ||
| const Eigen::VectorXd & | direction, | ||
| Eigen::VectorXd & | product, | ||
| const TrainingKernelGeometry * | training_geom = nullptr ) |
Exact Hessian-vector product of the negative log marginal likelihood, including the covariance-function prior.
H v = d/deps grad NLML(theta + eps v) at eps = 0. The data term is contracted from the cached inverse, alpha = K^{-1} y, and the kernel derivatives already used by the analytic gradient. beta = K^{-1}(D alpha) is the only new triangular solve. The MAP penalty is not included.
Returns false when exactNlmlHessianVectorAvailable() is false, for a missing factor, an HS-SVD Q-form objective, or a failed derivative assembly. The nlml_hessian_vector curvature mode then takes the finite_difference path, logged and counted.
Definition at line 371 of file Hessian.cpp.
| void gpr::GaussianProcessRegression::evaluatePriorMeanTargets | ( | const Eigen::VectorXd & | positions, |
| double & | energy, | ||
| Eigen::VectorXd & | gradient ) const |
Prior-mean targets for a virtual (conditioning-only) observation at ~positions~.
Fills the energy and gradient of the configured prior mean at the query geometry (zeros when no prior mean is active), so a virtual observation built from them carries an exactly-zero residual under the model's prior-mean subtraction.
Definition at line 1049 of file GaussianProcessRegression.cpp.
|
nodiscard |
Noisy training covariance, constant excluded, written directly in the factor's observation-tiled order: each pair-local tile entry and each diagonal term lands where permuteSymmetricMatrix would move it, with the same values. False when the rows have no pair-local geometry or no tiled permutation; cov_matrix is then unspecified.
Definition at line 2340 of file CovarianceAssembly.cpp.
|
nodiscard |
Definition at line 2369 of file CovarianceAssembly.cpp.
| void gpr::GaussianProcessRegression::evaluateTrainingCovarianceMatrix | ( | const EigenMatrix & | x, |
| const Eigen::VectorXd & | x_ind, | ||
| EigenMatrix & | cov_matrix, | ||
| bool | serial_per_rank = false, | ||
| bool | include_constant = true, | ||
| bool | include_noise = true ) |
Evaluate training covariance matrix (gp_cov + noise covariance).
The function takes in matrix x that contains training input vectors to GPR. Returns the noisy covariance matrix cov_matrix for observations y, which is sum of noisless covariance matrix and diagonal term, for example, from Gaussian noise.
Every element ij of noisless covariance matrix contains covariance between inputs i and j in x. The noisless covariance matrix is formed with all covariance functions.
This is essentially the application of the kernel function to the training points
| x | Training input vectors to GP |
| x_ind | Per-row observation type or derivative-channel indices |
| cov_matrix | Noisy covariance matrix for observations y |
| serial_per_rank | Assemble a complete local matrix without a collective reduction |
| include_constant | Include the constant covariance component |
| include_noise | Add observation noise to the diagonal |
Definition at line 1875 of file CovarianceAssembly.cpp.
|
nodiscard |
Definition at line 2209 of file CovarianceAssembly.cpp.
|
nodiscard |
Training-by-query cross-covariance written directly in the factor's row order: row r of the channel-major assembly lands at training_permutation_.inv_perm[r] with the same value. False when no permutation is active or the rows are not complete joint observations; cross is then unspecified.
Definition at line 2435 of file CovarianceAssembly.cpp.
|
inlinenodiscardvirtualnoexcept |
True when the fitted objective is the Gaussian negative log marginal likelihood that evaluateNlmlHessianVector differentiates. False for leave-one-out objectives, for the residual diagonal correction, whose parameter-dependent shift the product omits, while HS-SVD's Q-form objective is active, for ScaLAPACK (the implementation requires a replicated inverse), and for subclasses that rescale the likelihood (Student-t).
Reimplemented in gpr::StudentTProcessRegression.
Definition at line 2401 of file GaussianProcessRegression.h.
|
protected |
Definition at line 2598 of file Decompose.cpp.
| void gpr::GaussianProcessRegression::extractCoordinatesByIndex | ( | const EigenMatrix & | x, |
| const Eigen::VectorXd & | ind_Ddim, | ||
| const Index_t | ind, | ||
| FieldMatrixd & | x_loc ) const |
Extract coordinates from x using value ind from ind_Ddim.
Definition at line 2816 of file CovarianceAssembly.cpp.
| void gpr::GaussianProcessRegression::extractUniqueIndices | ( | const Eigen::VectorXd & | input_ind, |
| Eigen::VectorXd & | output_ind ) const |
Extract unique indices from the input vector.
Definition at line 2851 of file CovarianceAssembly.cpp.
|
inlinenodiscardnoexcept |
Monotone generation of the fitted posterior. Both full-data fits and conditioning on new observations advance the generation.
Definition at line 3169 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 863 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 880 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
True after the most recent optimize() / optimizeFactorized() call failed to converge. Set by the SCG / Ceres / INLA paths and inspected by the dimer's monitorAndAdaptHyperparameters loop.
Definition at line 3818 of file GaussianProcessRegression.h.
|
nodiscard |
Definition at line 190 of file GaussianProcessRegression.cpp.
|
nodiscard |
Optimize an independent correction on the appended observations using the conditional likelihood and the configured MAP priors. The fitted background and its output transform remain fixed. False requests a full refit when the correction cannot reach stationarity.
Definition at line 1168 of file ActivePosterior.cpp.
|
nodiscard |
Fit the nonnegative amplitude of an additive geodesic heat covariance against the current noisy base GP by exact joint energy-gradient marginal likelihood, including its configured diagonal nugget. The base can be inverse-distance Sexpat or a chart pullback; a zero optimum retains that base covariance.
Definition at line 2230 of file GaussianProcessRegression.cpp.
|
inlinenodiscardnoexcept |
Definition at line 720 of file GaussianProcessRegression.h.
|
nodiscard |
The theta-independent block geometry of the rows a hyperparameter fit evaluates, built on the first objective evaluation of the fit and reused by the rest; nullptr when the rows have no geometry. Keyed on coordinates, observation channels, kernel geometry and execution layout; released when the fit ends.
Definition at line 1795 of file CovarianceAssembly.cpp.
|
inlinenodiscardnoexcept |
The fit's step tolerance: a hyperparameter shift below it is one the optimizer itself treats as no move.
Definition at line 2624 of file GaussianProcessRegression.h.
| bool gpr::GaussianProcessRegression::fittedHyperparameterInformation | ( | Eigen::MatrixXd & | information, |
| Eigen::MatrixXd & | directions ) |
Observed information of the retained fitting density in its free log coordinates. Includes the selected MAP penalty and intrinsic kernel priors, on the actual fit rows and target scale. The columns of directions map these coordinates to packed kernel/noise parameters. Returns false without a supported interior fit snapshot. Uses a separate numerical workspace and preserves the live posterior factor.
Definition at line 867 of file LaplaceSlice.cpp.
|
inlinenodiscard |
The kernel hyperparameters as the optimizer sees them (log magnitude, log length scales); empty without a kernel.
Definition at line 2516 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
The observations the current posterior is fitted on.
Definition at line 3838 of file GaussianProcessRegression.h.
|
noexcept |
Drop the rgmin sessions' memory: the next fit starts cold. Called when the parameters move to another basin (an anneal stage).
Definition at line 3637 of file Optimize.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2705 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2802 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1031 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1027 of file GaussianProcessRegression.h.
|
inlinenodiscard |
Definition at line 3444 of file GaussianProcessRegression.h.
|
inline |
Definition at line 4117 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1191 of file GaussianProcessRegression.h.
|
inlinenodiscard |
Definition at line 3031 of file GaussianProcessRegression.inl.
|
inlinenodiscard |
Definition at line 3037 of file GaussianProcessRegression.inl.
|
inlinenodiscardnoexcept |
Definition at line 2077 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2161 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2153 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1710 of file GaussianProcessRegression.h.
|
nodiscardnoexcept |
Count of exact MAP Hessian actions built by dispatch.
Definition at line 162 of file GaussianProcessRegression.cpp.
|
inlinenodiscardnoexcept |
Definition at line 1567 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1609 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1625 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1617 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1675 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1636 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1647 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1601 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1556 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2389 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2378 of file GaussianProcessRegression.h.
|
nodiscardnoexcept |
Definition at line 227 of file GaussianProcessRegression.cpp.
|
inlinenodiscardnoexcept |
Configured numerical diagonal jitter variance.
Definition at line 3307 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1959 of file GaussianProcessRegression.h.
|
inlinenodiscard |
Read-only accessors for training-state members consumed by downstream Laplace / TCOV-INLA helpers.
Definition at line 3415 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1419 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3327 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1806 of file GaussianProcessRegression.h.
|
inlinenodiscard |
Definition at line 3010 of file GaussianProcessRegression.inl.
|
inlinenodiscard |
Definition at line 3015 of file GaussianProcessRegression.inl.
|
inlinenodiscardnoexcept |
Definition at line 2048 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2034 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 438 of file GaussianProcessRegression.h.
|
inlinenodiscard |
Definition at line 3042 of file GaussianProcessRegression.inl.
|
inline |
Count number of the first repetitive indices in ind_Ddim .
Definition at line 48 of file GaussianProcessRegression.inl.
|
inlinenodiscardnoexcept |
Definition at line 1446 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1428 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2446 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Physical diagonal regularisation of the training covariance: the Gaussian likelihood variance plus the numerical jitter, both mapped to the physical output frame. The posterior variance of a trained row is bounded by this total, so a force-readiness ceiling built from getSigma2() alone sits below the variance a fully resolved band can reach whenever the jitter is not negligible.
Definition at line 3389 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1948 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1527 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1536 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1518 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2177 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2199 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3455 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3451 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2058 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2068 of file GaussianProcessRegression.h.
|
inlinenodiscard |
Definition at line 3020 of file GaussianProcessRegression.inl.
|
inlinenodiscard |
Definition at line 3025 of file GaussianProcessRegression.inl.
|
inlinenodiscardnoexcept |
Live physical output-noise variance of the fitted model (the value the resolution-limit admission threshold and RFF path consume).
Definition at line 3378 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 4426 of file GaussianProcessRegression.h.
|
inline |
Definition at line 1360 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1410 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1400 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2125 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2025 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1779 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2107 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2091 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1509 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1969 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2617 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3240 of file GaussianProcessRegression.h.
|
inline |
Definition at line 3296 of file GaussianProcessRegression.h.
|
nodiscardprotectednoexcept |
Definition at line 294 of file DevicePosterior.cpp.
|
inlinenodiscardnoexcept |
Definition at line 1466 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1471 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 652 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Model expansion for a measured error despite small force uncertainty. This does not certify the force or restrict fitting to active lengths.
Definition at line 658 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1593 of file GaussianProcessRegression.h.
|
nodiscardnoexcept |
A usable training Cholesky factor exists for the linalg::forward_solve / back_solve consumers: either the dense member L matches the training rows, or (ScaLAPACK backend) the factor lives replicated-distributed in the DistributedState cache and is owned by this model. The scalapack cholesky() caches the factor and empties the dense member, and every triangular solve consults the cache first, so an empty dense L with a matching cache is fully functional; guards that compare getL().rows() against the training size bail on exactly that valid state.
Definition at line 196 of file Decompose.cpp.
|
nodiscard |
Definition at line 462 of file GaussianProcessRegression.cpp.
| std::vector< std::size_t > gpr::GaussianProcessRegression::holdLengthScalesUnresolvedBySubset | ( | const Observation & | subset | ) |
Hold, for the next fit, the length scales a pooled subset does not resolve: its inverse-distance features of that pair type span less than one length scale. Returns the held mask slots.
Definition at line 1426 of file Optimize.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2785 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2825 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2816 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2806 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2966 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2961 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2956 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3059 of file GaussianProcessRegression.h.
|
nodiscard |
Design row and reduced coefficients of one HS-SVD energy prediction. The standardized energy is their dot product.
Definition at line 1033 of file Decompose.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2794 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3120 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3110 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3116 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3135 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3125 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3131 of file GaussianProcessRegression.h.
|
nodiscard |
The local HS-SVD posterior covariance of positions against a caller-supplied prior block, as calculateObservationPosteriorCovariance reaches it, so a test can pose a prior the model never forms.
Definition at line 1851 of file Variance.cpp.
|
inlinenodiscard |
Definition at line 2889 of file GaussianProcessRegression.h.
|
inlinenodiscard |
Definition at line 2910 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2899 of file GaussianProcessRegression.h.
|
inlinenodiscard |
Definition at line 2914 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2893 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2920 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2934 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2929 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2829 of file GaussianProcessRegression.h.
|
inlineprotectedvirtual |
Factor on the data-fit term of the hyperparameter gradient, applied as the square root on alpha so that alpha^T dK alpha and the likelihood noise term scale together. The Gaussian marginal likelihood is 1. A model whose energy weighs the data term differently overrides it, and the geometry, permutation and dense gradient routes stay shared.
Reimplemented in gpr::StudentTProcessRegression.
Definition at line 3565 of file GaussianProcessRegression.h.
|
inlineprotectedvirtual |
False when evaluateEnergy(x, x_ind, y) is not the Gaussian marginal likelihood, so the HS-SVD energy that reads only the geometry cannot stand in for it.
Reimplemented in gpr::StudentTProcessRegression.
Definition at line 3581 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Name of the hyperparameter fit in force, for the run report.
Definition at line 3015 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2700 of file GaussianProcessRegression.h.
|
nodiscard |
Match one isotropic intrinsic length to the fitted global kernel's mean force variance in a nonredundant molecular tangent space. Returns no value when the chart or projected force metric is not positive and finite.
Definition at line 2296 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::initialize | ( | const InputParameters & | parameters, |
| const AtomsConfiguration & | conf_info ) |
Initialize GPR class.
| conf_info | Information about the configurations necessary for the GPR model |
| parameters | Structure of parameters |
Definition at line 1157 of file GaussianProcessRegression.cpp.
|
inlinenodiscardnoexcept |
Definition at line 420 of file GaussianProcessRegression.h.
|
nodiscardprotected |
Definition at line 164 of file INLA.cpp.
|
nodiscardprotected |
Definition at line 142 of file INLA.cpp.
|
inlinenodiscard |
Definition at line 3048 of file GaussianProcessRegression.h.
| bool gpr::GaussianProcessRegression::installActivePosteriorHessianActionsForTesting | ( | MeanHessianPreparation | background, |
| bool | background_exact, | ||
| MeanHessianPreparation | residual, | ||
| bool | residual_exact ) |
Replace the active posterior's Hessian actions for one test.
The fitted mean stays in place. A true exact flag makes a false action a refusal of that call only.
Definition at line 135 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::invalidateTrainingFactorCache | ( | ) |
Drop any cached training covariance factor without altering fitted hyperparameters or output normalization, forcing the next conditioning call to build a full Cholesky factor.
Definition at line 253 of file Decompose.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2764 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2777 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
True after the most recent covariance factorization succeeded. Dest INLA lives in a free helper, so it cannot read the protected flag.
Definition at line 3832 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2181 of file GaussianProcessRegression.h.
|
nodiscardprotected |
Definition at line 49 of file KrylovObjective.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2685 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2662 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
The last stage that ran, for diagnostics and tests.
Definition at line 2350 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Training configurations in the objective of the last hyperparameter fit (the farthest-point subset, or every row after an escalation).
Definition at line 2503 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Objective evaluations of the last hyperparameter fit.
Definition at line 2355 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2645 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Restarts of the last fit; only a marginal-likelihood fit restarts.
Definition at line 2650 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2654 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Newton (RFO) iterations taken by the most recent INLA mode search.
Definition at line 3033 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2594 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
How the last refresh set the hyperparameters: 0 held theta (stationary), 1 took the one Newton step, 2 ran the optimizer.
Definition at line 914 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2628 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2641 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 931 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Last stationarity decision: predicted shift, its threshold, and which curvature model supplied it (0 none, 1 Laplace, 2 Hessian, 3 inverse Hessian, 4 BB scalar, 5 same-objective gradient probe, 6 exact NLML Hessian-vector product under nlml_hessian_vector).
Definition at line 923 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 927 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1900 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Curvature probes spent by the last length-scale tie screen, whether they were exact NLML Hessian-vector products (nlml_hessian_vector) rather than gradient differences, and the curvature the screen used for each candidate, in candidate order.
Definition at line 1892 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1896 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
True when the last ~optimize~ started from a theta outside the MAP amplitude barrier of the rows it fitted; such a fit cannot move and the caller should re-seed the hyperparameters.
Definition at line 2510 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2942 of file GaussianProcessRegression.h.
|
protectednoexcept |
Definition at line 1613 of file Optimize.cpp.
|
nodiscard |
Definition at line 654 of file GaussianProcessRegression.cpp.
|
inlinenodiscardnoexcept |
Definition at line 1876 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Whether the packed parameter vector of length_count log lengths is governed by ties.
Definition at line 1907 of file GaussianProcessRegression.h.
|
nodiscardnoexcept |
Fitted Gaussian likelihood noise variance sigma_n^2. This is the restricted-variance acquisition floor, not the SE signal scale SexpatCF::getMagnSigma2().
Definition at line 486 of file GaussianProcessRegression.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2951 of file GaussianProcessRegression.h.
|
inlinevirtual |
Reimplemented in gpr::StudentTProcessRegression.
Definition at line 3982 of file GaussianProcessRegression.h.
|
inlinevirtual |
Reimplemented in gpr::StudentTProcessRegression.
Definition at line 3988 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::logProfileSplitSummary | ( | ) |
Definition at line 403 of file GaussianProcessRegression.cpp.
|
nodiscard |
Own a fixed pair-kernel snapshot with zero metric weights for inactive lengths. Theta contains log signal variance in physical output units, followed by log descriptor lengths in the full pair-type order.
Definition at line 965 of file ActivePosterior.cpp.
|
inlinenoexcept |
Fitted hyperparameters installed from outside the optimizer, e.g. a seed kernel handed over by the band that produced the training rows.
Definition at line 534 of file GaussianProcessRegression.h.
|
protected |
Definition at line 313 of file DevicePosterior.cpp.
|
protected |
Definition at line 312 of file DevicePosterior.cpp.
| GaussianProcessRegression::MeasuredRowVerdict gpr::GaussianProcessRegression::measuredRowsAgreeWithPosterior | ( | const Observation & | rows, |
| ConvergenceNormType | force_norm, | ||
| double * | max_force_error = nullptr, | ||
| double * | max_force_sd = nullptr, | ||
| double * | evidence_nats = nullptr, | ||
| double | variance_calibration = 1.0, | ||
| RefitTrustReport * | trust_report = nullptr ) |
Compare every measured row with the posterior it was drawn against. A row contradicts the posterior when its force error exceeds the posterior force standard deviation at that row (both in the caller's convergence norm): the fitted hyperparameters are then refit. Rows the posterior explains within its own uncertainty leave the hyperparameters in place; conditioning on the rows is what reduces the uncertainty. Unmeasurable when no fitted, decomposed posterior exists or the rows carry no measured forces. ~evidence_nats~, when given, receives the contradiction evidence of the rows: the sum over rows with error e above spread sd of (e/sd)^2/2 - 1/2, in nats. variance_calibration scales the posterior force variance before the comparison: the dimer's own measured calibration of that variance, never below one, so a posterior its trials found overconfident is not contradicted by every row it predicts.
Definition at line 1813 of file Optimize.cpp.
|
protected |
Monitors hyperparameter history for oscillations and adapts the FPS history size.
If the ratio of sign flips in the recent history of hyperparameter updates exceeds a threshold, it indicates instability. In response, the size of the data subset for future optimizations is increased.
| new_parameters | The latest vector of optimized hyperparameters. |
Definition at line 3521 of file Optimize.cpp.
|
inlinenodiscard |
Definition at line 400 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
True when curvature_mode is nlml_hessian_vector. SCG curvature, the length-scale tie screen and the stationarity check then take their curvature from evaluateNlmlHessianVector. Where the product is not available or fails, each takes the finite_difference path instead: SCG's gradient probe, the tie screen's gradient differences and the stationarity check's gradient secant.
Definition at line 2420 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Times this model routed an nlml_hessian_vector request to the finite_difference path (a fit of an objective without the product, a tie screen or a stationarity check), each logged at report level 1.
Definition at line 2428 of file GaussianProcessRegression.h.
|
nodiscardnoexcept |
Lifetime count of refits that kept the input theta because the marginal likelihood there was non-finite. The stop reason names the same event.
Definition at line 5133 of file Optimize.cpp.
| void gpr::GaussianProcessRegression::noteNlmlHessianVectorFallback | ( | const char * | where, |
| const char * | why ) |
Counts and logs one such routing: where took the finite_difference path because of why.
Definition at line 361 of file Hessian.cpp.
|
inlinenoexcept |
Evidence against the surrogate at a measured point, the trigger of the next anneal stage under the evidence policy.
Definition at line 2327 of file GaussianProcessRegression.h.
|
nodiscardprotected |
Kernel, constant and likelihood parameters the objective was evaluated at, to tie a gradient call to it.
Definition at line 34 of file KrylovObjective.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2608 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1450 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1461 of file GaussianProcessRegression.h.
|
nodiscard |
Nonzero entries of protected_rows exclude observations from scoring and give them infinite influence. A collective call excludes a row only when every process protects it. An empty mask scores every row.
removal_norm, when supplied, receives for every scored observation J the kernel norm of the change its removal makes to the posterior mean, sqrt(alpha_J^T (P_JJ)^{-1} alpha_J) with P = C^{-1}. The reproducing property bounds the change at every geometry x by sqrt(k(x, x)) times that norm, on the band and away from it.
Definition at line 4547 of file Optimize.cpp.
|
nodiscard |
Per-observation influence on the band posterior.
Fills influence with, for each row of observation, the largest shift its removal would produce in the posterior energy or a Cartesian force at any point of band_positions, computed exactly by the block downdate identity (derivation and verification in scripts/derive_adaptive_pruning_influence.py). Values are in the model's target units, so a caller prunes by comparing against the likelihood noise. Returns false when the model cannot be factored, in which case nothing may be pruned. With collective=true, every process in the model's group participates in factor reuse; a call that cannot reuse the training factor shares the covariance blocks and the scored observations out across the processes, and every process receives the values of a rank-local call.
Definition at line 4539 of file Optimize.cpp.
| void gpr::GaussianProcessRegression::optimize | ( | const Observation & | observation | ) |
Optimize paramaters of a Gaussian process.
This function optimizes the parameters of a GP structure given matrix X of training inputs and vector Y of training targets.
Definition at line 550 of file Optimize.cpp.
| void gpr::GaussianProcessRegression::optimizeChemistryFactorized | ( | const Observation & | observation | ) |
Chemistry-constrained ARD refit: pairtype lengthscale ratios fixed from descriptor spreads, global scale on a warm-centered log grid, (prefactor, noise) exact per grid point via the factorized likelihood. A handful of factorizations per refit instead of an SCG trajectory; ratio churn between refits is structurally impossible. Enabled by setChemFactorizedHyperparameters(true); degenerate descriptor scales fall back to the SCG core.
Definition at line 4918 of file Optimize.cpp.
| void gpr::GaussianProcessRegression::optimizeFactorized | ( | const Observation & | observation | ) |
Alternative optimization via eigendecomposition + noise grid search.
Assembles the unit signal sexpat kernel without observation noise, eigendecomposes it, then uses FactorizedLikelihood and NoiseGridSearch. The analytical prefactor is the signal variance. The installed observation noise is that prefactor times the profiled noise to signal ratio.
Only works for isotropic lengthscale (single lengthscale for all pairtypes). For ARD, falls back to optimize().
| observation | The full set of observed data. |
Definition at line 4491 of file Optimize.cpp.
|
protected |
Definition at line 402 of file INLA.cpp.
|
nodiscard |
Fit by the Gaussian negative log marginal likelihood alone. The optimizer's MAP prior and barrier penalties are disabled; the positive parameter domain remains part of the covariance definition.
Definition at line 952 of file Optimize.cpp.
|
inlinenodiscardnoexcept |
Definition at line 1741 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1749 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1745 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1727 of file GaussianProcessRegression.h.
|
nodiscard |
Pack the current hyperparameters into the same flat vector layout consumed by ~setParameters~. The trailing log(sigma_n^2) likelihood-noise coordinate is included only when the active theta owns that coordinate. Inverse of ~setParameters~; suitable for snapshot / restore.
Definition at line 494 of file GaussianProcessRegression.cpp.
|
inlinenodiscardnoexcept |
Definition at line 1935 of file GaussianProcessRegression.h.
| bool gpr::GaussianProcessRegression::parkTrainingCholeskyFactor | ( | ) |
Move this model's distributed training factor out of the process-wide ScaLAPACK solve slot while another GP owns it.
Definition at line 289 of file Decompose.cpp.
|
protected |
Definition at line 2076 of file Optimize.cpp.
|
nodiscardprotected |
Definition at line 610 of file GaussianProcessRegression.cpp.
|
nodiscardprotected |
Definition at line 617 of file GaussianProcessRegression.cpp.
|
inlinenodiscardnoexcept |
True when the ZBL or Morse prior mean is the one evaluation uses.
Definition at line 2003 of file GaussianProcessRegression.h.
|
protected |
Update the plan from the dense factor just formed at this order.
Definition at line 68 of file KrylovObjective.cpp.
| void gpr::GaussianProcessRegression::poolDescriptorScaleByTies | ( | Eigen::VectorXd & | scales | ) | const |
Pools a per-pair-type motion scale, sqrt of the summed feature variances of the type, over each tie group: every tied member takes the scale of the union of its group's pairs, the base type's own statistic, so a tied model seeds and anchors exactly as the base model does. Released types keep their own scale.
Definition at line 750 of file GaussianProcessRegression.cpp.
|
inlinenodiscardnoexcept |
Definition at line 1764 of file GaussianProcessRegression.h.
|
protected |
Definition at line 307 of file DevicePosterior.cpp.
|
nodiscard |
The analytic part of prepareMeanHessian. Empty when this model's mean has no analytic Hessian contraction; the returned action never falls back to a stencil of the mean gradient. Unlike prepareMeanHessian it also contracts the Cholesky weights of an HS-SVD model whose stable basis was not built.
Definition at line 2560 of file ActivePosterior.cpp.
|
nodiscard |
Linear action of the physical posterior mean at one geometry.
The operator is consumed while this fitted model remains unchanged. An exact kernel that returns no action, or an action that returns false, has refused. In a mean with one exact term and one generic term, refusal of the exact term is final. Outside an active posterior, a prepared HS-SVD product is the action before the exact MAP kernel is consulted. A prepared block that does not apply has refused; the exact kernel and the stencil are not substitutes.
Definition at line 2554 of file ActivePosterior.cpp.
|
nodiscard |
Definition at line 1636 of file Decompose.cpp.
|
nodiscard |
Definition at line 1184 of file CovarianceAssembly.cpp.
|
protected |
Definition at line 430 of file GaussianProcessRegression.cpp.
|
protected |
Definition at line 448 of file GaussianProcessRegression.cpp.
|
inlinenodiscardnoexcept |
Definition at line 1706 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1540 of file GaussianProcessRegression.h.
|
inlineprotectedvirtual |
Rows and y^T C^{-1} y of the posterior weights just written. The Student-t gradient scale reads them, so a later update, append, retain or refit cannot keep an earlier training vector's weight.
Reimplemented in gpr::StudentTProcessRegression.
Definition at line 3573 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::reduceTiedLengthScaleGradient | ( | Eigen::VectorXd & | gradient | ) | const |
J^T g: each leader's gradient entry becomes the sum over its group, the derivative of the objective restricted to the tied subspace, and the held members' entries become zero.
Definition at line 773 of file GaussianProcessRegression.cpp.
|
nodiscard |
Condition the fixed active kernel on an extended observation suffix. Returns false when a full fit must replace the retained background.
Definition at line 2360 of file ActivePosterior.cpp.
|
protected |
Definition at line 311 of file DevicePosterior.cpp.
|
nodiscard |
Refresh the full-data posterior at fixed theta when the cached objective-stationarity predictor says the MAP shift is smaller than the configured threshold. Returns false when the threshold is disabled, no Hessian cache is available, or the predicted shift is too large.
Definition at line 3830 of file Optimize.cpp.
| void gpr::GaussianProcessRegression::refreshLengthScaleLeaders | ( | ) |
Recomputes the leaders from the released flags.
Definition at line 713 of file GaussianProcessRegression.cpp.
|
inlinevirtual |
Hook called inside calculateVarianceLaplace at each CCD grid point, right after calculateMeanPrediction (so b := L^{-1} y is valid) and before calculateVariance(scratch_var). Purpose: let subclasses refresh any hyperparameter-dependent cached scalar that their override of calculateVariance consumes.
Default: no-op. StudentTProcessRegression overrides this to recompute tp_prefactor_ = (2 hp_b + S) / (2 hp_a + n - 2) per grid point so the mixture variance reflects the TP's full hyperparameter posterior (the MAP prefactor is stale at every off-centre CCD point).
Reimplemented in gpr::StudentTProcessRegression.
Definition at line 3980 of file GaussianProcessRegression.h.
|
noexcept |
Definition at line 1848 of file CovarianceAssembly.cpp.
|
inline |
Gives the tie member its own length scale, as the evidence screen does once it has accumulated enough.
Definition at line 1883 of file GaussianProcessRegression.h.
|
protected |
Definition at line 217 of file Decompose.cpp.
| void gpr::GaussianProcessRegression::removeColumn | ( | const Index_t | column_ind, |
| EigenMatrix & | matrix ) |
Remove column from the dense matrix.
| column_ind | Column index |
| matrix | Dense matrix |
Definition at line 2833 of file CovarianceAssembly.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2885 of file GaussianProcessRegression.h.
|
nodiscardnoexcept |
Definition at line 5128 of file Optimize.cpp.
|
noexcept |
Reset the count of exact MAP Hessian actions built by dispatch.
Definition at line 155 of file GaussianProcessRegression.cpp.
|
inlinenoexcept |
Definition at line 2970 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2979 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 3140 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2798 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2781 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2789 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1666 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2690 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2681 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2658 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2938 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2947 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1544 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
True while a Kokkos copy of the training factor is retained beside L. Host execution memory keeps the single Eigen factor and leaves this false. Device memory retains the copy.
Definition at line 2727 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 648 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Configurations carrying the environment residual process in the last residual fit, and how many configurations that fit covered. Equal counts mean the fit was the exact model; a smaller inducing count means the residual prior was the Nystrom projection onto those configurations with each configuration's own block restored, so single-geometry variances stayed exact.
Definition at line 644 of file GaussianProcessRegression.h.
|
nodiscard |
Recondition the retained correction after restoring its background parameters and output coordinates. False denotes an empty restore point; incompatible ownership, coordinates, or observations throw.
Definition at line 920 of file ActivePosterior.cpp.
| void gpr::GaussianProcessRegression::restoreAtomicEnvironmentParameterState | ( | const AtomicEnvironmentParameterState & | state | ) |
Restore the atomic parameter domain and invalidate its conditioning. The caller rebuilds the posterior on the observations it retains.
Definition at line 288 of file AtomicEnvironment.cpp.
| void gpr::GaussianProcessRegression::restoreLengthScaleFitState | ( | const LengthScaleFitState & | state | ) |
Definition at line 662 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::restoreOutputTransform | ( | double | mean, |
| double | scale, | ||
| bool | frozen_mean ) |
Restore output coordinates alongside a kernel represented in them.
Definition at line 2094 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::restoreSecantQuadraticPrior | ( | const SecantQuadraticPriorState & | state | ) |
Reinstall a retained quadratic. The use counter is a running tally of what this model evaluated, not part of the quadratic, so it keeps every use made while another quadratic was installed.
Definition at line 842 of file GaussianProcessRegression.cpp.
|
nodiscard |
Definition at line 909 of file ActivePosterior.cpp.
|
nodiscard |
Materialize and retain the EB/Laplace hyperparameter distribution. Other uncertainty modes return an empty quadrature.
Definition at line 83 of file HyperparameterPosterior.cpp.
|
nodiscard |
Definition at line 835 of file GaussianProcessRegression.cpp.
|
inlinenodiscardnoexcept |
Definition at line 4081 of file GaussianProcessRegression.h.
|
protected |
Definition at line 225 of file Decompose.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2233 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2219 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2223 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2472 of file GaussianProcessRegression.h.
|
nodiscardnoexcept |
Curvature pairs the last rgmin fit transplanted from that record.
Definition at line 3623 of file Optimize.cpp.
|
nodiscardnoexcept |
Fits the rgmin sessions opened with the previous fit's record.
Definition at line 3608 of file Optimize.cpp.
|
inlinenodiscardnoexcept |
Definition at line 1588 of file GaussianProcessRegression.h.
|
nodiscardprotected |
First and second derivatives of the learned likelihood noise variance along direction: the rigid-block covariance derivatives of the rigid-null deflated objective, whose rigid block is noise alone.
Definition at line 73 of file Hessian.cpp.
|
inlinenodiscardnoexcept |
Definition at line 1584 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1835 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1821 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1830 of file GaussianProcessRegression.h.
|
nodiscard |
Definition at line 631 of file GaussianProcessRegression.cpp.
| bool gpr::GaussianProcessRegression::samplePhysicalPriorMean | ( | const Eigen::VectorXd & | position, |
| double & | energy, | ||
| Eigen::VectorXd & | gradient ) const |
Exact energy and Cartesian gradient of that prior. False when neither prior is active.
Definition at line 853 of file GaussianProcessRegression.cpp.
| bool gpr::GaussianProcessRegression::scaleLaplaceFactorForTesting | ( | std::size_t | index, |
| double | scale ) |
Multiplies the Cholesky factor of Laplace factor index by scale on the rank that owns it, building the posterior first. A scale far below 1 inflates the whitened cross covariance, so the stable variance of that factor is negative and is refused. Returns whether this rank owned and rescaled the factor.
Definition at line 1061 of file LaplacePosterior.cpp.
| void gpr::GaussianProcessRegression::scaleTrainingVarianceToPhysical | ( | Eigen::Ref< Eigen::VectorXd > | variance | ) | const |
Definition at line 2430 of file Decompose.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2632 of file GaussianProcessRegression.h.
|
nodiscard |
Definition at line 884 of file GaussianProcessRegression.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2021 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2017 of file GaussianProcessRegression.h.
|
protected |
Select a hyperparameter-optimization subset via FPS-EMD.
FPS-EMD (Goswami & Jonsson, ChemPhysChem 27 (2025), doi:10.1002/cphc.202500730) is a hyperparameter subset: full X stays for prediction. Keep fps_options.latest_points (default 2) most recent observations, then greedy-maximin the remainder of fps_options.history on fps_options.metric (default EMD). The force_threshold gate is +inf and does not drop points.
| full_observation | The complete set of observations. |
Definition at line 1490 of file Optimize.cpp.
|
protected |
Select a hyperparameter-optimization subset via FPS-EMD.
Rows selectOptimizationSubset would keep, in ascending order: the same latest-points-plus-FPS choice, without copying the observation.
FPS-EMD (Goswami & Jonsson, ChemPhysChem 27 (2025), doi:10.1002/cphc.202500730) is a hyperparameter subset: full X stays for prediction. Keep fps_options.latest_points (default 2) most recent observations, then greedy-maximin the remainder of fps_options.history on fps_options.metric (default EMD). The force_threshold gate is +inf and does not drop points.
| full_observation | The complete set of observations. |
Definition at line 1270 of file Optimize.cpp.
|
nodiscard |
Choose D on observation without installing it. The production cap is kRFFValidationMemoryCapBytes. A smaller cap is only a test of the refusal path.
Definition at line 382 of file RFFSelection.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2710 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 572 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Compare an additive two-body correction, one squared-exponential per chemical pair type on the inverse distance summed over the pairs, alone and on top of the pair correction. Environment refinements share their declared chemical parent in this component. Selected only if NLML and geometry LOO improve.
Definition at line 593 of file GaussianProcessRegression.h.
|
inline |
The anneal stage before the local MAP fit (AnnealStage.h): a box ensemble of replicas chains with budget work units, run on the first fit and on every every-th fit after it. enabled turns the stage on. A zero budget spends what the last local fit spent (at least one evaluation per independent, unpinned parameter plus one); a zero every runs the stage on the first full fit and then only on evidence against the surrogate (a measured force error at or above the force tolerance, or a local fit that did not converge); a positive every runs it on every such fit regardless. The box half-width is the length-scale prior's scale. A build without the anneal subproject refuses the stage instead of accepting the request and fitting without it.
Definition at line 2307 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::setAtomicEnvironmentModel | ( | bool | enabled | ) |
Fit an additive atomic-environment posterior to complete physical energy and Cartesian-gradient observations. Refits optimize the full atomic parameter vector; pair-length active-refit masks do not apply.
Definition at line 233 of file AtomicEnvironment.cpp.
|
inline |
Set the NEB chain image count so optimize() can apply image-count-adaptive length-scale controls where configured.
Definition at line 3314 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1173 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::setConditionedHessian | ( | const Eigen::VectorXd & | point, |
| const Eigen::MatrixXd & | hessian ) |
Definition at line 168 of file GaussianProcessRegression.cpp.
|
inline |
Definition at line 2073 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2157 of file GaussianProcessRegression.h.
|
inlinenoexcept |
DELTA-method robustness knobs. The alpha-K Hessian Laplace correction delta_var(x*) = g(x*)^T H^{-1} g(x*) where H is the NLML Hessian at theta_MAP, blows up when H is ill-conditioned (small min(diag(U_H)) at small training-set size). Observed 1e15-1e17 eV^2 on Baker-NEB 01_hcn outer iters 0 to 8 vs MAP variance of order 1 eV^2; the pure LAPLACE-SLICE arm without DELTA stays bounded. Two complementary guards applied inside calculateVarianceLaplaceSliceDelta:
delta_uh_min_diag : skip the correction (delta_var = 0) when min(diag(U_H)) is below this floor. Default 1e-6. Set <= 0 to disable. delta_max_ratio : cap per-query delta_var at this multiple of max(magnSigma2, 1e-12). Default 100.0 (cap corrected std dev at ~10x signal std dev). Set <= 0 to disable.
Both default to active; bit-identical to the legacy DELTA path when both are set to 0.
Definition at line 2149 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Predict the mean through the inverse-distance descriptor form of the kernel on every backend. The descriptor form is a reparametrisation of the Sexpat kernel (their predictions agree to rounding), and its per-row cost is O(n_feat * dof) against the O((1+dof)^2 * n_pairs) Cartesian joint-block assembly.
Definition at line 3002 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1691 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::setEnvironmentResiduals | ( | bool | enabled | ) |
Compare pair, SOAP and pair+SOAP corrections on the same conditional observations. SOAP is selected only if NLML and geometry LOO improve.
Definition at line 942 of file ActivePosterior.cpp.
|
inlinenoexcept |
Whether the auto stationarity mode also ends each fit at its scale.
Definition at line 1440 of file GaussianProcessRegression.h.
|
inlinenoexcept |
The fit's objective and step tolerances (the rgmin gradient tolerance is their minimum).
Definition at line 2565 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2673 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::setGeodesicHeatPrior | ( | std::shared_ptr< const GeodesicHeatEnergyForceKernel > | kernel | ) |
Attach a fitted heat component and select its exact execution paths. The component retains its own reference geometry and pair metric.
Definition at line 2208 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::setHierarchicalPrior | ( | const Eigen::VectorXd & | mu_log, |
| double | s2_log ) |
Activate a hierarchical-Bayes Gaussian prior on this GP's SExp kernel log-parameters: ~log(theta) ~ N(mu_log, s2_log * I)~. The packed layout of ~mu_log~ matches ~packInlaHyperparameters()~ – ~[log(magnSigma2), log(lengthScale[0]), ..., log(lengthScale[K-1])]~ plus an active trailing ~log(sigma_n^2)~ likelihood-noise coordinate when present. The next ~optimize~ call adds this prior's contribution to the SCG NLML objective; setting ~mu_log~ to the session GP's MAP turns the per-image SCG into a posterior shrinkage estimator that pulls noisy small-N per-image fits back toward the global anchor. Forward to the SExp covariance function; the constant kernel (which has no learnable hyperparameter) is unaffected.
Definition at line 2072 of file GaussianProcessRegression.cpp.
|
inlinenoexcept |
Definition at line 1563 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1605 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1621 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1613 of file GaussianProcessRegression.h.
|
noexcept |
Make the dense HS-SVD block apply fail for one test.
The vector product is unchanged. The dense assembly treats the failed apply as a final refusal and does not build action columns.
Definition at line 149 of file GaussianProcessRegression.cpp.
|
inlinenoexcept |
Definition at line 1632 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1643 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1597 of file GaussianProcessRegression.h.
|
inline |
Definition at line 2879 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2834 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1552 of file GaussianProcessRegression.h.
|
inline |
Definition at line 2522 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2384 of file GaussianProcessRegression.h.
|
noexcept |
Explicit mode selection. It outranks the optimization_alg string of any InputParameters applied later through initialize(), so a profile default cannot silently undo a run's configured mode.
Definition at line 261 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::setHyperparameters | ( | const Observation & | all_obs, |
| const AtomsConfiguration & | conf_info, | ||
| const bool | update_sexpat_cf_param = true, | ||
| const bool | update_const_cf_param = true, | ||
| const bool | update_sqrt_prior_param = true ) |
Set up hyperparameters for GPR.
| all_obs | Structure of all observations |
| conf_info | Structure of atoms configuration |
| update_sexpat_cf_param | Set to "true" to update parameters of the SexpAt covariance function |
| update_const_cf_param | Set to "true" to update parameters of the Constant covariance function |
| update_sqrt_prior_param | Set to "true" to update parameters of the SQRT prior |
Definition at line 1405 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::setInternalCoordinateChart | ( | std::shared_ptr< const geometry::InternalCoordinateChart > | chart, |
| double | length_scale ) |
Configure this regression as a fixed-chart local molecular GP. The ordinary dense joint energy-gradient posterior remains active, while feature paths specialized to inverse-distance Sexpat geometry are disabled. Local chart models inherit or set their scalar kernel parameters and condition without a separate hyperparameter optimizer.
Definition at line 2139 of file GaussianProcessRegression.cpp.
|
inline |
Set sigma2 jitter value.
Definition at line 2981 of file GaussianProcessRegression.inl.
|
inlinenoexcept |
Definition at line 1955 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1415 of file GaussianProcessRegression.h.
|
inline |
Absolute kernel length-scale floor for the MAP projection domain. Callers set it to the finest PES structure their sampling stencil resolves (the dimer sets its finite-difference stencil diameter); 0 disables the floor.
Definition at line 3323 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Floor each pair type's length-scale seed (and the MAP prior anchor rho0) at the covalent-bond descriptor scale 1/r_bond. The measured seed is the pair type's inverse-distance spread over the rows; a spectator pair that barely moves in the first rows gets a spread of 0.003 A^-1 where the fitted value is 0.1-0.3 (a static pair already falls back to the chemical scale, so the floor removes a cliff between "static" and "barely moving").
Definition at line 1802 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::setLengthScaleTies | ( | bool | enabled | ) |
Definition at line 685 of file GaussianProcessRegression.cpp.
|
inlinenodiscard |
Definition at line 1073 of file GaussianProcessRegression.h.
|
nodiscard |
Set the likelihood noise variance in physical output units.
LikGaussian stores the converted variance in standardized training-target units. A changed value invalidates noise-dependent model state. When full_observation is non-null, that state is rebuilt from the supplied observations before this function returns.
| physical_sigma2 | Positive finite variance in physical output units. |
| full_observation | Optional full training observation for rebuilding noise-dependent model state. |
Definition at line 310 of file GaussianProcessRegression.cpp.
|
inlinenoexcept |
Definition at line 2039 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2030 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::setMapMeanKernelForTesting | ( | std::shared_ptr< const KernelOperator > | kernel | ) |
Install the kernel used as the MAP mean expansion.
Tests supply an exact operator the fitted covariance cannot express. A null pointer restores the Sexpat expansion.
Definition at line 123 of file GaussianProcessRegression.cpp.
|
noexcept |
Make an installed MAP test kernel take precedence over HS-SVD.
Definition at line 129 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::setModelProfile | ( | GPModelProfile | profile | ) |
Select a coherent GP model family.
CHEMGP / GPRD_ZBL restore classic joint energy-force configurations as indivisible bundles (dense NLML, raw targets, classic Sexpat prior). GPRD_ZBL matches the published gpridge dimer path vendored in gprd_zbl; EXTENDED leaves independent knobs alone.
Definition at line 1292 of file GaussianProcessRegression.cpp.
|
inlinenoexcept |
Makes evaluateNlmlHessianVector fail while exactNlmlHessianVectorAvailable() stays true.
Definition at line 2555 of file GaussianProcessRegression.h.
|
inline |
Select the objective backend. Dense is the default; Auto and Krylov opt into approximate objectives on a dense training covariance. Krylov pivots its preconditioner to rank.
Definition at line 2578 of file GaussianProcessRegression.h.
|
inline |
Definition at line 2589 of file GaussianProcessRegression.h.
|
inline |
Definition at line 1494 of file GaussianProcessRegression.h.
|
inline |
Definition at line 1476 of file GaussianProcessRegression.h.
|
inline |
Definition at line 1484 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1432 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1424 of file GaussianProcessRegression.h.
|
inline |
Keep these measured configurations in the hyperparameter subset. Matching rows take precedence over the history pool and FPS choices. A subset grows only when its required rows exceed the history size.
Definition at line 557 of file GaussianProcessRegression.h.
|
inline |
Restrict the hyperparameter-optimization subset to the flagged rows of the next optimize() call; the posterior is still conditioned on every row. An empty pool or a size mismatch selects from all rows.
Definition at line 541 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Rows the hyperparameter optimizer fits on: the farthest-point subset of this many rows (plus the latest points) when the training set is larger, the full set otherwise. Nonpositive means every row. The canonical gprd value is 10, adaptively grown to 30 on detected instability; a 300-row band model then had its theta fitted on 10 rows every outer iteration.
Definition at line 2442 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Floor the output standardization scale at the energy the gradient data imply. A near-flat energy target has a collapsing standard deviation, and dividing the Cartesian gradient by it amplifies the standardized gradient targets without bound; the fixed standardized noise then stops regularizing them. The floor is sqrt(jitter) * rms(abs(G_row)) * rms(abs(R_row - mean R)), an energy built from the gradient scale (eV/A), the spread of the sampled geometries (A) and the model's own relative noise. It raises a collapsing scale only. Default off.
Definition at line 1723 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2841 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Complete energy/gradient layouts assemble directional curvature from pair tiles, including a zero cutoff, with one owner per tile on distributed layouts. The switch follows the pair-local tiles unless set explicitly. Off, curvature rebuilds every channel-pair block.
Definition at line 1943 of file GaussianProcessRegression.h.
|
inlinenoexcept |
The pair-local tiles assemble the training covariance and contract its hyperparameter derivatives per configuration pair; off, the per-channel block geometry does both.
Definition at line 1931 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::setParameters | ( | const Eigen::VectorXd & | w | ) |
Set GP parameters. This function sets parameters in the covariance functions sexpat and constant and in the Gaussian likelyhood lik_gaussian.
| w | Vector of combined parameters from covariance functions and likelyhood. Used by callers (e.g. OCINEB) that snapshot then restore theta around a sibling phase that would otherwise drift it. |
Definition at line 2112 of file GaussianProcessRegression.cpp.
|
inline |
Set parameters of the GPR model.
Definition at line 2987 of file GaussianProcessRegression.inl.
|
inline |
Physics collocation set for hyperparameter selection: the live band (discrete IRC). When nonempty, the chem-factorized grid rejects hyperparameters whose posterior energy profile along these points oscillates (total variation beyond a scale-free multiple of the profile range), a constrained empirical-Bayes filter in the physics-informed-GP sense. Empty clears the filter.
Definition at line 1187 of file GaussianProcessRegression.h.
|
inline |
The campaign's population prior on the log length scales per element pair (gpr/prior/PopulationPrior.h): a pair type the population has seen is anchored at its location with its width, both in the kernel's hierarchical prior and in the MAP anchor.
Definition at line 1759 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::setPrincipledNugget | ( | bool | use | ) |
Definition at line 523 of file GaussianProcessRegression.cpp.
|
inlinenoexcept |
The constant the GP reverts to away from its data. The mean of the residual energies lets a surrogate relaxation find lower energy in every direction the training rows never varied (a spectator bond compressed inside one length scale reverts toward a mean that sits below the images near the barrier); the maximum makes every such extrapolation uphill, so the band relaxes where the data supports it and the acquisition measures the boundary.
Definition at line 1702 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1523 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1532 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1514 of file GaussianProcessRegression.h.
|
noexcept |
A dimer search sets this so an L-BFGS recovery that does not lower the MAP objective is discarded and the SCG point is kept. A flat ridge otherwise moves the hyperparameters without a better fit.
Definition at line 5122 of file Optimize.cpp.
|
inlinenoexcept |
Definition at line 2548 of file GaussianProcessRegression.h.
|
noexcept |
Keep a snapshot of the fitted density after each hyperparameter fit so fittedHyperparameterInformation can describe it. Off by default: a fit then copies no rows, targets or kernel and leaves the distance cache and the slice-Laplace state untouched.
Definition at line 860 of file LaplaceSlice.cpp.
|
inline |
Configure the layered RFF predict path. D_rff > 0 enables a fixed count and clears automatic selection. optimize() rebuilds the RFF model on the full observation after each successful SCG fit. 0 disables (default; bit-identical when automatic selection is off).
Definition at line 2190 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Largest distance, in log-hyperparameter units, the first step of a cold rgmin MAP fit may move the parameters (RgminOpt::setInitialLogMove). Zero leaves the first step to the solver.
Definition at line 2468 of file GaussianProcessRegression.h.
|
inlinenoexcept |
True (default) lowers the opening step of the whole cold session so its first trial moves at most the bound; false caps the first step only.
Definition at line 2479 of file GaussianProcessRegression.h.
|
noexcept |
Solver for HyperparameterOptimizationMode::RGMIN_OPT. Applies to the next mode selection as well as the live optimizer, so order of configuration does not matter.
Definition at line 218 of file GaussianProcessRegression.cpp.
|
inlinenoexcept |
Transplant the previous fit's record into the next fit (default true). The record is the accepted steps of the last converged fit as curvature pairs, taken only when the move they propose for the new gradient stays within the opening trust, and dropped when measured rows contradict the posterior (measuredRowsAgreeWithPosterior; funcmin::RgminOpt::setPersistentSession).
Definition at line 2370 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::setRigidNullDeflation | ( | bool | enabled | ) |
Opt-in rigid-motion nullspace deflation for free systems.
Default false. When true, projects each free geometry's gradient block onto the orthonormal complement of its rigid motions before Dense or HS-SVD factorization and adds the exact closed-form decoupled noise contribution back to the NLML objective and noise gradient. On free 2-atom Lennard-Jones marginal-likelihood fits, removing the null rigid modes eliminates ~4e-11 rounding drift at step 0 and shifts rgmin SCG+L-BFGS iteration counts (e.g. 28 -> 33, or 38 -> 49 across max_iter=15 restarts).
Definition at line 509 of file GaussianProcessRegression.cpp.
|
inlinenoexcept |
Robust rows: the Student-t degrees of freedom of the per- configuration observation model, fitted as a Gaussian scale mixture by one EM sweep per full-data rebuild (0 keeps the Gaussian likelihood).
Definition at line 1817 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2053 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2063 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2559 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 2526 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::setSecantQuadraticPrior | ( | const Eigen::VectorXd & | position, |
| const Eigen::VectorXd & | gradient, | ||
| const Eigen::MatrixXd & | hessian, | ||
| double | reference_energy ) |
Quadratic mean carried by an accepted true-force secant. When a ZBL or Morse prior is already active the quadratic is the residual of that prior, and the two add: m(x) = m_prior(x) + q(x).
Definition at line 807 of file GaussianProcessRegression.cpp.
|
inlinenoexcept |
Skip a hyperparameter fit whose objective the previous converged fit already minimized. The fitted theta depends on the fit subset and the start only: when an append leaves the selected rows unchanged and the model still holds the theta that fit returned, the fit has nothing to minimize and the new rows are conditioned at that theta. Default off.
Definition at line 2488 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::setSliceLaplaceHessianCholForTesting | ( | const Eigen::MatrixXd & | U | ) |
Definition at line 4124 of file Optimize.cpp.
|
inlinenoexcept |
Policy for a subset fit that does not converge. True (default) refits on every retained row with every length scale active, which swaps the estimator for a different objective. False keeps the subset estimator: the feasible improvement (or the input theta) stands, and the all-rows fit runs only when the subset objective is not evaluable at either point, since the subset then carries no likelihood to optimize.
Definition at line 2457 of file GaussianProcessRegression.h.
|
inlinenoexcept |
SVGD config getters/setters. Default-constructed SteinVariationalConfig matches the prior hardcoded literals (T=30, eps=0.05, conv_tol=1e-3) so existing callers stay bit-identical until they opt in.
Definition at line 4422 of file GaussianProcessRegression.h.
|
inline |
Select which predictive path consumers should use. Default MAP matches the pre-Laplace behaviour bit-for-bit; LAPLACE routes through calculatePotentialLaplace (CCD mixture), BMA is reserved for the reference path (not yet wired).
Definition at line 1356 of file GaussianProcessRegression.h.
| void gpr::GaussianProcessRegression::setUpDefault | ( | ) |
Set up default parameters.
This function allocates memory for the private pointers and calls for setUpDefault() method on each pointer.
|
inlinenoexcept |
Enable the alpha-K contraction for Laplace-mixture mean prediction.
Definition at line 1406 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Enable the alpha-K contraction for MAP mean prediction.
Definition at line 1396 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Switch the LAPLACE_SLICE arm to the analytical INLA-Delta variance estimator (Rue 2009 sec 3.2; GPstuff INLA mode 0 'gaussian'). Replaces the per-call sampling/quadrature loop with the closed-form formula: Var[mu(x*) | y] = Var_MAP(x*) + g(x*)^T H^{-1} g(x*), g(x*)_j ~= k_cross^T dalpha/dtheta_j. SymPy proof D1-D7 in python/tests/test_sympy_inla_delta.py. Per-call cost O(p N n_q) (no per-call Cholesky); the slice/ PSIS sampling burst is skipped entirely.
Definition at line 2121 of file GaussianProcessRegression.h.
|
inline |
Teng/Bao first-level Morse force-field prior mean. Default off. Mutually exclusive with ZBL at evaluation: Morse wins if both flags are set so the residual is not ZBL+Morse stacked.
Definition at line 1977 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Opt-in log-normal prior on magnSigma2 (PriorLogNormal). Off keeps the half-Student-t or half-Cauchy magnitude prior.
Definition at line 1785 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1775 of file GaussianProcessRegression.h.
|
inline |
Select explicit precision algebra for the direct Cholesky posterior. Posterior means materialize the inverse from the active factor at each use. Posterior variances solve against that factor and do not form it. The inverse is dense and is not retained across objective or posterior changes.
Definition at line 4107 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Switch the PSIS-Laplace sampler between random IS draws (default, false) and a deterministic axial CCD-style grid (true) of K = 1 + 2 p nodes placed at theta_MAP +/- sigma_j e_j on the principal axes of H^{-1}. Deterministic grid is np-reproducible; random IS retains MC variance per rank. Standard INLA Gaussian-mode quadrature (Rue 2009 sec 3.2, GPstuff INLA mode 0).
Definition at line 2103 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Switch the LAPLACE_SLICE arm between the doubling slice sampler (default, false) and the PSIS-Laplace sampler (Vehtari 2024, arXiv:1507.02646 v9). PSIS-Laplace replaces the slice's M*~5 Cholesky burst with K Cholesky decomps + a Pareto k_hat reliability check.
Definition at line 2087 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 1505 of file GaussianProcessRegression.h.
|
inline |
Definition at line 1964 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Definition at line 3006 of file GaussianProcessRegression.h.
|
inline |
Definition at line 2274 of file GaussianProcessRegression.h.
|
inlinenoexcept |
Posterior covariance conditioned on the training configurations nearest the query only (all channels of the m nearest in the pair-distance metric): the exact posterior of a GP that has seen a subset of the data, an upper bound in the Loewner order on the full posterior, at a cost in m rather than in the training size. Zero keeps the full solve. The subset factor is cached across the queries of one factor epoch that select the same configurations.
Definition at line 2257 of file GaussianProcessRegression.h.
|
inlinenoexcept |
The configurations the subset posterior conditions on, chosen by the caller (the search footprint: every configuration the search measured and the seeds within their radius); empty falls back to the nearest-N rule above. The dimer supplies its search footprint as the subset.
Definition at line 2266 of file GaussianProcessRegression.h.
|
inline |
Share the enclosing search deadline with every hyperparameter optimizer. A null limit removes the callback.
Definition at line 2532 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2492 of file GaussianProcessRegression.h.
|
nodiscard |
Solve the training covariance with RHS and result in factor order. Callers supplying derivative matrices use symmetricMatrixInTrainingFactorLayout.
Definition at line 276 of file Decompose.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2461 of file GaussianProcessRegression.h.
|
inlinenodiscardprotectedvirtualnoexcept |
Reimplemented in gpr::StudentTProcessRegression.
Definition at line 5572 of file GaussianProcessRegression.h.
|
nodiscard |
Definition at line 1150 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::synchronizeOutputTransformFrom | ( | const GaussianProcessRegression & | source | ) |
Use the same affine output coordinates as another GP.
Local and global posteriors that share kernel parameters must also condition on the same residual target E - mean(E). Otherwise changing model ownership changes both the predicted energy and, through the posterior coefficients, its Cartesian gradient.
Definition at line 2087 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::tieLengthScaleParameters | ( | Eigen::VectorXd & | theta | ) | const |
Sets every tied member to its leader's log length (theta(1 + t)).
Definition at line 739 of file GaussianProcessRegression.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2855 of file GaussianProcessRegression.h.
|
nodiscard |
tr(K^{-1} A) through the training factor. A is in observation order.
Definition at line 2370 of file EnergyGradient.cpp.
|
nodiscardprotected |
Definition at line 493 of file Predict.cpp.
|
inlinenodiscard |
The training covariance C. Under a resident device posterior the host matrix is not kept; L L^T of the downloaded factor stands in and reproduces C to the rounding of the factorization.
Definition at line 2748 of file GaussianProcessRegression.h.
|
nodiscard |
The cross-covariance in factor rows, placed when it can be and assembled channel-major and permuted otherwise.
Definition at line 2482 of file CovarianceAssembly.cpp.
| bool gpr::GaussianProcessRegression::trainingFactorAppendable | ( | Eigen::Index | observations | ) | const |
Has a full or conditional hyperparameter fit been accepted? Trust decisions require a fitted posterior with calibrated parameters. True when a full-data rebuild on ~observations~ configurations would append to the cached distributed factor instead of refactorizing: the factor is live, the design grows, and the kernel parameters are those it was built with.
Definition at line 3148 of file Decompose.cpp.
|
inlinenodiscard |
Definition at line 846 of file GaussianProcessRegression.h.
|
inlinenodiscard |
Definition at line 2773 of file GaussianProcessRegression.h.
|
nodiscardprotected |
Definition at line 523 of file Predict.cpp.
|
inlinenodiscardnoexcept |
Definition at line 2924 of file GaussianProcessRegression.h.
|
inlinenodiscardprotected |
The training Gram through the operator layer's dense Cholesky backend, on the current factor L.
Definition at line 5291 of file GaussianProcessRegression.h.
|
nodiscard |
The noise the trained factor conditions on (likelihood variance plus jitter, condition-floored), the certificate gap eps_k - lambda_min_cert of the exact-kernel factor, and the noise the interval certifies. Returns false when the interval is unsupported; throws std::runtime_error when the factor cannot be built.
Definition at line 810 of file Variance.cpp.
|
protected |
Definition at line 2875 of file CovarianceAssembly.cpp.
|
nodiscard |
Energy-channel posterior variance from a cached factorization.
Assembles only the energy (index-0) query block, so the cross-covariance is n_atoms columns rather than n_atoms*(D+1). That is the cheap Pmat the ActiveGP force() gate needs: if this returns false the caller must use calculateVariance (exact Amat). Distributed-only ScaLAPACK L is refused so the path never issues a collective to answer a point query. HS-SVD uses the cached basis and applies the same LOO calibration factor as calculateVarianceHssvd.
Definition at line 604 of file Variance.cpp.
|
nodiscard |
Two-sided certified Schur energy-variance intervals [lower, upper] from the exact-kernel HS-SVD MAP bordered factor. The noise is the one the trained factor inverts (condition-floored, as for the mean). A negative lower endpoint is clamped to zero when the upper endpoint is nonnegative. Returns false when the model lacks the exact kernel; throws std::domain_error when M cannot be certified positive definite or the upper endpoint is negative.
Definition at line 837 of file Variance.cpp.
|
nodiscard |
nullopt selects the per-channel representation. A returned false rejects invalid data; true supplies the owned bare kernel derivatives.
Definition at line 969 of file CovarianceAssembly.cpp.
|
inlinenodiscardnoexcept |
Fits skipped because the subset and the theta were unchanged.
Definition at line 2497 of file GaussianProcessRegression.h.
|
nodiscardprotected |
Inverse of permuteTrainingVector: returns input mapped back to the caller training-row order. Identity when no permutation is active. Used by tests and by mixture-mean predict paths that need posterior alpha in the caller's index space.
Definition at line 624 of file GaussianProcessRegression.cpp.
| void gpr::GaussianProcessRegression::updateConfiguration | ( | const AtomsConfiguration & | conf_info | ) |
Update the internal atoms configuration. Use this when the set of active/frozen atoms changes dynamically.
Definition at line 4447 of file Optimize.cpp.
| void gpr::GaussianProcessRegression::updateModelWithFullData | ( | const Observation & | full_observation | ) |
Definition at line 4205 of file Optimize.cpp.
| bool gpr::GaussianProcessRegression::updateRobustRowWeights | ( | const Observation & | full_observation | ) |
E-step over the conditioned model: leave-one-geometry-out residuals of every training configuration, their squared Mahalanobis norm, and the extra noise the M-step registers with the likelihood. Returns true when any registered noise changed.
Definition at line 37 of file RobustRows.cpp.
|
inlinenodiscardnoexcept |
Definition at line 1790 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 4111 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 1456 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3010 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 3173 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2280 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2289 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2270 of file GaussianProcessRegression.h.
|
inlinenodiscardnoexcept |
Definition at line 2285 of file GaussianProcessRegression.h.
|
inlinenodiscard |
Collective on the model's process group for distributed fitters.
Definition at line 2544 of file GaussianProcessRegression.h.
|
friend |
|
friend |
Definition at line 4491 of file GaussianProcessRegression.h.
|
friend |
Definition at line 15 of file PublicLayout.cpp.
|
friend |
Definition at line 3639 of file GaussianProcessRegression.h.
|
mutableprotected |
Definition at line 5467 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5466 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5463 of file GaussianProcessRegression.h.
|
mutableprotected |
Definition at line 5418 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5422 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5423 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5474 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5483 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5472 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5485 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5476 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5299 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5298 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5443 of file GaussianProcessRegression.h.
|
mutableprotected |
Definition at line 5465 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5487 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5481 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5444 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5489 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5488 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5469 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5468 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5421 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5588 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5589 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5587 of file GaussianProcessRegression.h.
| std::unique_ptr<SexpatCF> gpr::GaussianProcessRegression::sexpat_cov_func |
Definition at line 4092 of file GaussianProcessRegression.h.
|
mutableprotected |
Lazily materialized inverse diagonal in factor order, invalidated by every full rebuild. The unit-calibration bound needs only diag(L).
Definition at line 5563 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5471 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5479 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5417 of file GaussianProcessRegression.h.
|
protected |
Definition at line 5586 of file GaussianProcessRegression.h.