Namespaces | |
| namespace | testing |
Classes | |
| struct | BayesianQuadratureCalibration |
| class | BayesianQuadratureCholeskyError |
| struct | BayesianQuadratureConfig |
| struct | BayesianQuadratureCumulative |
| struct | BayesianQuadratureFitReport |
| class | BayesianQuadratureInferenceError |
| struct | BayesianQuadratureIntegral |
| struct | BayesianQuadratureIntegralReport |
| struct | BayesianQuadratureMeasure |
| class | BayesianQuadratureModel |
| class | BayesianQuadratureNumericalError |
| struct | BayesianQuadratureSelection |
| class | FreeEnergyCholeskyError |
| The training covariance did not factor at the fitted hyperparameters. More... | |
| struct | FreeEnergyFitReport |
| Last hyperparameter fit. More... | |
| class | FreeEnergyInferenceError |
| Hyperparameter inference produced no usable posterior. More... | |
| struct | FreeEnergyObservations |
| struct | FreeEnergyPathPosterior |
| class | FreeEnergyRateUnsupportedError |
| class | FreeEnergySaddleNotFoundError |
| class | FreeEnergySurrogate |
| struct | FreeEnergySurrogateConfig |
| struct | KramersRateConfig |
| struct | KramersRateSummary |
| class | Matern32 |
| Matern 3/2 of the Euclidean radius, k(0) = variance. More... | |
| class | Matern52 |
| Matern 5/2 of the Euclidean radius, k(0) = variance. More... | |
| struct | MaternMixture |
| struct | ParameterBound |
| One axis of the search box. More... | |
| struct | ParameterObservation |
| One evaluated parameter vector, as ParameterSearch::observe() takes it. More... | |
| class | ParameterSearch |
| Ask-and-tell minimization of a noisy loss over a parameter box. More... | |
| struct | ParameterSearchConfig |
| struct | ParameterSearchResult |
| class | ProductRadial |
| f * g on one squared distance. More... | |
| class | RadialShape |
| One of SquaredExponential, Matern32 and Matern52 behind a tag. More... | |
| struct | ScalarFitBounds |
| Box of the fit in natural units. An empty vector or a non-positive scalar selects the default of defaultScalarFitBounds(). More... | |
| struct | ScalarFitConfig |
| Settings of fitScalarHyperparameters(). More... | |
| struct | ScalarFitResult |
| Result of fitScalarHyperparameters(). More... | |
| class | ScalarGaussianProcess |
| Kernel::covariance(left, right) is the prior covariance of two rows. More... | |
| struct | ScalarHyperparameters |
| Hyperparameters of a stationary scalar GP. More... | |
| struct | ScalarLikelihoodData |
| Observations the marginal likelihood is evaluated on. More... | |
| class | ScalarSurrogate |
| Scalar GP on a parameter vector for a noisy oracle. More... | |
| class | ScaledEuclideanDistance |
| Squared Euclidean distance with one length scale, or one per coordinate. More... | |
| class | ScaledRadial |
| c * f. The scale is finite and may be negative. The leaf keeps its variance. More... | |
| class | SplitMix64 |
| class | SquaredExponential |
| k(r^2) = variance * exp(-r^2 / 2). The value at zero is the variance. More... | |
| class | StationaryKernel |
| Covariance k(d(x, x')). Distance::squared and Radial::operator()(double). More... | |
| class | SumRadial |
| f + g on one squared distance. More... | |
Concepts | |
| concept | SquaredDistance |
| squared(left, right) is the squared separation of two parameter rows. | |
| concept | RadialFunction |
| operator()(double) is the covariance of one squared distance. | |
Typedefs | |
| using | MeanBasis |
| Basis functions phi(x) of the parametric mean. The returned vector has the same length at every x. | |
| template<typename Inner> | |
| using | Dual |
Enumerations | |
| enum class | BayesianQuadratureKernel { SquaredExponential , Matern32Product , Matern52Product , Matern32Isotropic , Matern52Isotropic } |
| enum class | BayesianQuadratureHyperMode { Fixed , MarginalLikelihood , Map , TpMarginal , Marginalized } |
| enum class | BayesianQuadratureBasis { FollowConfig = -1 , None = 0 , Constant = 1 , Affine = 2 } |
| enum class | BayesianQuadratureMeasureKind { LebesgueBox , UniformBox , Gaussian } |
| enum class | ParameterAcquisition { ExpectedImprovement , LowerConfidenceBound } |
| enum class | MeanBasisKind { None , Constant , Affine } |
| Built-in mean bases of ScalarSurrogate. More... | |
| enum class | RadialKind { SquaredExponential , Matern32 , Matern52 } |
| Radial shape of a stationary kernel, selected at run time. More... | |
Functions | |
| double | squaredExponentialBoxMean (const Eigen::VectorXd &point, const Eigen::VectorXd &lower, const Eigen::VectorXd &upper, const Eigen::VectorXd &lengthscales) |
| double | squaredExponentialBoxDouble (const Eigen::VectorXd &lower, const Eigen::VectorXd &upper, const Eigen::VectorXd &lengthscales) |
| double | squaredExponentialBoxCross (const Eigen::VectorXd &lower, const Eigen::VectorXd &first_upper, const Eigen::VectorXd &second_upper, const Eigen::VectorXd &lengthscales) |
| double | maternMixtureUnit (double squared_distance, double nu, const Eigen::VectorXd &nodes, const Eigen::VectorXd &weights) |
| double | analyticUnitMatern (double squared_distance, double nu) |
| void | gaussLegendreInterval (int order, std::vector< double > &nodes, std::vector< double > &weights) |
| MaternMixture | maternMixture (double nu) |
| const MaternMixture & | matern32Mixture () |
| const MaternMixture & | matern52Mixture () |
| double | mixtureScale (double node, double nu) |
| double | maternMixtureBoxMean (const MaternMixture &rule, const Eigen::VectorXd &point, const Eigen::VectorXd &lower, const Eigen::VectorXd &upper, const Eigen::VectorXd &lengthscales) |
| double | maternMixtureBoxDouble (const MaternMixture &rule, const Eigen::VectorXd &lower, const Eigen::VectorXd &upper, const Eigen::VectorXd &lengthscales) |
| double | maternMixtureBoxCross (const MaternMixture &rule, const Eigen::VectorXd &lower, const Eigen::VectorXd &first_upper, const Eigen::VectorXd &second_upper, const Eigen::VectorXd &lengthscales) |
| void | requireSymmetricCovariance (const Eigen::MatrixXd &covariance) |
| double | squaredExponentialGaussianMean (const Eigen::VectorXd &point, const Eigen::VectorXd &mean, const Eigen::MatrixXd &covariance, const Eigen::VectorXd &lengthscales) |
| double | squaredExponentialGaussianDouble (const Eigen::MatrixXd &covariance, const Eigen::VectorXd &lengthscales) |
| double | squaredExponentialGaussian1D (double point, double mean, double variance, double lengthscale) |
| double | squaredExponentialGaussianDouble1D (double variance, double lengthscale) |
| std::vector< Eigen::Index > | activeMixtureNodes (const MaternMixture &rule) |
| void | requireProductMixtureBudget (const MaternMixture &rule, Eigen::Index dimension) |
| template<class Visitor> | |
| void | forEachProductMixtureNode (const MaternMixture &rule, const std::vector< Eigen::Index > &active, Eigen::Index dimension, Visitor &&visit) |
| Eigen::VectorXd | maternProductGaussianMeans (const MaternMixture &rule, const Eigen::MatrixXd &points, const Eigen::VectorXd &mean, const Eigen::MatrixXd &covariance, const Eigen::VectorXd &lengthscales) |
| double | maternProductGaussianDouble (const MaternMixture &rule, const Eigen::MatrixXd &covariance, const Eigen::VectorXd &lengthscales) |
| bool | covarianceIsDiagonal (const Eigen::MatrixXd &covariance) |
| double | expectedImprovementScore (double mu, double mu_best, double sigma) |
| Jones expected improvement for a maximizer. | |
| double | expectedImprovementForMinimum (double mu, double best, double sigma) |
| Expected improvement for a minimizer. | |
| double | probabilityOfFeasibility (double mu, double sigma, double threshold=0.0) |
| Probability that a normal constraint value is feasible. | |
| double | constrainedExpectedImprovementForMinimum (double mu, double best, double sigma, double constraint_mu, double constraint_sigma) |
| Constrained expected improvement for a minimizer. | |
| double | lowerConfidenceBound (double mu, double sigma, double kappa) |
| Lower confidence bound for a minimizer, mu - kappa * sigma. | |
| Eigen::VectorXd | freeEnergyNoiseFromWeights (const Eigen::VectorXd &weights, double reference_variance, double min_relative_weight) |
| bool | isDiscrete (const ParameterBound &bound) |
| True for an integer axis or an axis with allowed values. | |
| void | validateBound (const ParameterBound &bound) |
| Throw std::invalid_argument unless the axis is well formed. | |
| double | unitToParameter (double unit, const ParameterBound &bound) |
| Map a unit-cube coordinate to the parameter of its axis. | |
| double | parameterToUnit (double parameter, const ParameterBound &bound) |
| Unit-cube coordinate of a parameter, the inverse of unitToParameter(). | |
| double | snapUnit (double unit, const ParameterBound &bound) |
| The unit-cube coordinate of the lattice point a coordinate rounds to. A continuous axis returns the clamped coordinate. | |
| template<typename Objective, typename Kernel> | |
| ParameterSearchResult | minimize (Objective &&objective, const std::vector< ParameterBound > &bounds, const ParameterSearchConfig &config, const Kernel &kernel) |
| template<typename Objective> | |
| ParameterSearchResult | minimize (Objective &&objective, const std::vector< ParameterBound > &bounds, const ParameterSearchConfig &config) |
| ScalarFitBounds | defaultScalarFitBounds (const ScalarLikelihoodData &data) |
| Default box of the fit, from the spread of the observations. | |
| ScalarFitResult | fitScalarHyperparameters (const ScalarLikelihoodData &data, const ScalarHyperparameters &initial, const ScalarFitConfig &config={}) |
| Maximize the log marginal likelihood over the hyperparameters. | |
| Eigen::Index | scalarParameterCount (const ScalarLikelihoodData &data) |
| Number of fitted parameters: the length scales, the signal variance and, without per-row variances, the noise variance. | |
| double | scalarLogMarginalLikelihood (const ScalarLikelihoodData &data, const ScalarHyperparameters &hyper, Eigen::VectorXd *gradient=nullptr) |
| Log marginal likelihood log p(y | X, theta) and its gradient. | |
| void | fillStandardNormal (SplitMix64 &generator, Eigen::VectorXd &normal) |
| Independent standard normals, two per pair of uniforms (Box-Muller). | |
| double | kernelMean1D (const SquaredExponential &radial, double point, double lower, double upper, double lengthscale) |
| double | kernelMean1D (const Matern32 &radial, double point, double lower, double upper, double lengthscale) |
| double | kernelMean1D (const Matern52 &radial, double point, double lower, double upper, double lengthscale) |
| double | kernelDoubleIntegral1D (const SquaredExponential &radial, double lower, double upper, double lengthscale) |
| double | kernelDoubleIntegral1D (const Matern32 &radial, double lower, double upper, double lengthscale) |
| double | kernelDoubleIntegral1D (const Matern52 &radial, double lower, double upper, double lengthscale) |
| template<class Radial> | |
| double | kernelMean1DLogLengthDerivative (const Radial &radial, double point, double lower, double upper, double lengthscale) |
| template<class Radial> | |
| double | kernelDoubleIntegral1DLogLengthDerivative (const Radial &radial, double lower, double upper, double lengthscale) |
| template<typename Radial> | |
| ScaledRadial< Radial > | scaledRadial (double scale, Radial radial) |
| template<typename Left, typename Right> | |
| SumRadial< Left, Right > | sumRadial (Left left, Right right) |
| template<typename Left, typename Right> | |
| ProductRadial< Left, Right > | productRadial (Left left, Right right) |
| template<typename Distance, typename Radial> requires SquaredDistance<Distance> && RadialFunction<Radial> | |
| StationaryKernel< Distance, Radial > | stationaryKernel (Distance distance, Radial radial) |
| template<typename T, typename Value> | |
| T | lift (const Value &value) |
Variables | |
| constexpr double | kMaxProductMixtureNodes = 2.0e5 |
| using gpr::derivatives::detail::Dual |
Definition at line 241 of file RadialMeanDerivatives.h.
| using gpr::bo::MeanBasis |
Basis functions phi(x) of the parametric mean. The returned vector has the same length at every x.
Definition at line 37 of file ScalarGaussianProcess.h.
|
strong |
Basis of the flat-prior Bayes–Sard mean model. It sets the posterior mean and variance, the integral moments, the acquisition scores, the leave-one-out calibration, and the amplitude profile and evidence of the hyperparameter fit. FollowConfig keeps the v1 switch use_prior_mean: true is the constant basis, false is none.
| Enumerator | |
|---|---|
| FollowConfig | |
| None | |
| Constant | |
| Affine | |
Definition at line 70 of file BayesianQuadrature.h.
|
strong |
| Enumerator | |
|---|---|
| Fixed | |
| MarginalLikelihood | |
| Map | |
| TpMarginal | |
| Marginalized | |
Definition at line 57 of file BayesianQuadrature.h.
|
strong |
| Enumerator | |
|---|---|
| SquaredExponential | |
| Matern32Product | |
| Matern52Product | |
| Matern32Isotropic | |
| Matern52Isotropic | |
Definition at line 49 of file BayesianQuadrature.h.
|
strong |
| Enumerator | |
|---|---|
| LebesgueBox | |
| UniformBox | |
| Gaussian | |
Definition at line 77 of file BayesianQuadrature.h.
|
strong |
Built-in mean bases of ScalarSurrogate.
| Enumerator | |
|---|---|
| None | Zero mean. |
| Constant | phi(x) = 1. |
| Affine | phi(x) = (1, x_1, ..., x_d). |
Definition at line 34 of file ScalarSurrogate.h.
|
strong |
| Enumerator | |
|---|---|
| ExpectedImprovement | |
| LowerConfidenceBound | |
Definition at line 66 of file ParameterSearch.h.
|
strong |
Radial shape of a stationary kernel, selected at run time.
| Enumerator | |
|---|---|
| SquaredExponential | |
| Matern32 | |
| Matern52 | |
Definition at line 258 of file StationaryKernel.h.
|
inline |
Indices of the mixture nodes whose weight is above the cut that keeps the pruned mass below the kernel error budget.
Definition at line 375 of file BayesianQuadratureMoments.h.
|
inline |
Definition at line 106 of file BayesianQuadratureMoments.h.
|
inline |
Constrained expected improvement for a minimizer.
Expected improvement of the loss times the probability that an independent constraint model is feasible: Gardner et al. (2014) and Gelbart, Snoek and Adams (2014). The constraint is feasible at or below zero.
Definition at line 79 of file ExpectedImprovement.h.
|
inline |
Definition at line 481 of file BayesianQuadratureMoments.h.
| ScalarFitBounds gpr::bo::defaultScalarFitBounds | ( | const ScalarLikelihoodData & | data | ) |
Default box of the fit, from the spread of the observations.
Length scale of an axis: 0.02 to 20 times the range of that column of x. Signal variance: 1e-4 to 1e3 times the sample variance of y. Noise variance: 1e-8 to 10 times the sample variance of y. A column or a y without spread uses one as its scale.
Definition at line 107 of file ScalarHyperparameterFit.cpp.
|
inline |
Expected improvement for a minimizer.
The maximizer score on negated values. best is the smallest loss seen so far.
Definition at line 46 of file ExpectedImprovement.h.
|
inline |
Jones expected improvement for a maximizer.
EI = (mu - mu_best) Phi(z) + sigma phi(z), with z = (mu - mu_best) / sigma. The score is zero when sigma is not positive or the inputs are not finite.
Definition at line 27 of file ExpectedImprovement.h.
|
inline |
Independent standard normals, two per pair of uniforms (Box-Muller).
Definition at line 47 of file SplitMix64.h.
| ScalarFitResult gpr::bo::fitScalarHyperparameters | ( | const ScalarLikelihoodData & | data, |
| const ScalarHyperparameters & | initial, | ||
| const ScalarFitConfig & | config = {} ) |
Maximize the log marginal likelihood over the hyperparameters.
Every start runs the rgmin L-BFGS solver on the logarithms of the hyperparameters with the analytic gradient, inside the box. The start with the largest likelihood is returned. A noise variance supplied per row is kept and only the length scales and the signal variance move.
| initial | First start, clipped into the box. A single length scale applies to every axis. |
| std::invalid_argument | for inconsistent sizes or an empty box. |
| std::runtime_error | when no start has a finite likelihood. |
Definition at line 131 of file ScalarHyperparameterFit.cpp.
|
inline |
Visits every joint node of a product mixture. visit(weight, scales) receives the product weight and the per-axis scale factors.
Definition at line 405 of file BayesianQuadratureMoments.h.
| Eigen::VectorXd gpr::bo::freeEnergyNoiseFromWeights | ( | const Eigen::VectorXd & | weights, |
| double | reference_variance, | ||
| double | min_relative_weight ) |
noise[i] = reference * max(w) / max(w[i], min_relative * max(w)). Scale-invariant in the weights. Every weight is positive and finite, reference is positive and finite, and min_relative lies in (0, 1]. Throws std::domain_error when a noise variance overflows.
Definition at line 344 of file FreeEnergySurrogate.cpp.
|
inline |
Definition at line 112 of file BayesianQuadratureMoments.h.
|
inline |
True for an integer axis or an axis with allowed values.
Definition at line 127 of file ParameterSearch.h.
|
inline |
Definition at line 511 of file StationaryKernel.h.
|
inline |
Definition at line 535 of file StationaryKernel.h.
|
inline |
Definition at line 487 of file StationaryKernel.h.
| double gpr::bo::kernelDoubleIntegral1DLogLengthDerivative | ( | const Radial & | radial, |
| double | lower, | ||
| double | upper, | ||
| double | lengthscale ) |
Definition at line 575 of file StationaryKernel.h.
|
inline |
Definition at line 463 of file StationaryKernel.h.
|
inline |
Definition at line 475 of file StationaryKernel.h.
|
inline |
Definition at line 448 of file StationaryKernel.h.
| double gpr::bo::kernelMean1DLogLengthDerivative | ( | const Radial & | radial, |
| double | point, | ||
| double | lower, | ||
| double | upper, | ||
| double | lengthscale ) |
Definition at line 562 of file StationaryKernel.h.
| T gpr::derivatives::lift | ( | const Value & | value | ) |
Definition at line 35 of file NestedAutoDiff.h.
|
inline |
Lower confidence bound for a minimizer, mu - kappa * sigma.
A non-finite input returns +infinity so a minimizer skips the point.
Definition at line 93 of file ExpectedImprovement.h.
|
inline |
Definition at line 221 of file BayesianQuadratureMoments.h.
|
inline |
Definition at line 227 of file BayesianQuadratureMoments.h.
|
inline |
Plain generalized Gauss–Laguerre at a few hundred nodes leaves a relative kernel error near 5e-5, because exp(-a/t) is not a polynomial in t. The substitution t = exp(u) makes the gamma-mixture integrand smooth, and a fixed Gauss–Legendre panel rule then matches the closed-form Matérn to a small multiple of machine epsilon. The window and panel count are the smallest values in the search below that meet that test.
Definition at line 167 of file BayesianQuadratureMoments.h.
|
inline |
Definition at line 271 of file BayesianQuadratureMoments.h.
|
inline |
Definition at line 255 of file BayesianQuadratureMoments.h.
|
inline |
Definition at line 238 of file BayesianQuadratureMoments.h.
|
inline |
Definition at line 92 of file BayesianQuadratureMoments.h.
|
inline |
Definition at line 463 of file BayesianQuadratureMoments.h.
|
inline |
Product Matérn kernel mean under a Gaussian with any covariance. Each axis is a gamma scale mixture of squared exponentials, so the product is a joint mixture of squared exponentials with diagonal scales, and each term has the closed full-covariance Gaussian moment.
Definition at line 435 of file BayesianQuadratureMoments.h.
| ParameterSearchResult gpr::bo::minimize | ( | Objective && | objective, |
| const std::vector< ParameterBound > & | bounds, | ||
| const ParameterSearchConfig & | config ) |
Default kernel: one length scale on every unit-cube axis, squared exponential. A categorical axis is compared for equality.
Definition at line 711 of file ParameterSearch.h.
| ParameterSearchResult gpr::bo::minimize | ( | Objective && | objective, |
| const std::vector< ParameterBound > & | bounds, | ||
| const ParameterSearchConfig & | config, | ||
| const Kernel & | kernel ) |
Definition at line 514 of file ParameterSearch.h.
|
inline |
Definition at line 233 of file BayesianQuadratureMoments.h.
|
inline |
Unit-cube coordinate of a parameter, the inverse of unitToParameter().
Allowed value i of k sits at i / (k - 1), and at 0.5 when k is one. A parameter that is not an allowed value takes the coordinate of the nearest one. Other axes are clamped to [0, 1].
Definition at line 203 of file ParameterSearch.h.
|
inline |
Probability that a normal constraint value is feasible.
P(c <= threshold) for c normal with mean mu and standard deviation sigma, which is Phi((threshold - mu) / sigma). A zero sigma gives one when mu is at most the threshold and zero otherwise. A non-finite input or a negative sigma gives zero.
Definition at line 60 of file ExpectedImprovement.h.
| ProductRadial< Left, Right > gpr::bo::productRadial | ( | Left | left, |
| Right | right ) |
Definition at line 700 of file StationaryKernel.h.
|
inline |
Definition at line 384 of file BayesianQuadratureMoments.h.
|
inline |
A covariance is read through its lower triangle by the Cholesky factor, so an asymmetric matrix would be integrated as a different, symmetric one. Reject it instead. The tolerance is roundoff of the matrix's own scale.
Definition at line 292 of file BayesianQuadratureMoments.h.
|
inline |
Log marginal likelihood log p(y | X, theta) and its gradient.
With K = k(X, X) + diag(noise), the value is -1/2 y^T K^-1 y - 1/2 log|K| - n/2 log(2 pi). With a basis H of p columns it is -1/2 y^T P y - 1/2 log|K| - 1/2 log|H^T K^-1 H|
| gradient | Optional. Receives scalarParameterCount() derivatives with respect to the logarithms of the length scales, of the signal variance and, without per-row variances, of the noise variance, in that order: 1/2 tr((a a^T - P) dK/dtheta), a = P y. |
Definition at line 124 of file ScalarHyperparameterFit.h.
|
inline |
Number of fitted parameters: the length scales, the signal variance and, without per-row variances, the noise variance.
Definition at line 61 of file ScalarHyperparameterFit.h.
| ScaledRadial< Radial > gpr::bo::scaledRadial | ( | double | scale, |
| Radial | radial ) |
Definition at line 688 of file StationaryKernel.h.
|
inline |
The unit-cube coordinate of the lattice point a coordinate rounds to. A continuous axis returns the clamped coordinate.
Definition at line 231 of file ParameterSearch.h.
|
inline |
Definition at line 59 of file BayesianQuadratureMoments.h.
|
inline |
Definition at line 46 of file BayesianQuadratureMoments.h.
|
inline |
Definition at line 32 of file BayesianQuadratureMoments.h.
|
inline |
Definition at line 352 of file BayesianQuadratureMoments.h.
|
inline |
Definition at line 331 of file BayesianQuadratureMoments.h.
|
inline |
Definition at line 361 of file BayesianQuadratureMoments.h.
|
inline |
Definition at line 307 of file BayesianQuadratureMoments.h.
| StationaryKernel< Distance, Radial > gpr::bo::stationaryKernel | ( | Distance | distance, |
| Radial | radial ) |
Definition at line 746 of file StationaryKernel.h.
| SumRadial< Left, Right > gpr::bo::sumRadial | ( | Left | left, |
| Right | right ) |
Definition at line 694 of file StationaryKernel.h.
|
inline |
Map a unit-cube coordinate to the parameter of its axis.
An axis with k allowed values splits [0, 1] into k equal cells. An integer axis maps as the continuous one does and rounds to the nearest whole number in the interval.
Definition at line 170 of file ParameterSearch.h.
|
inline |
Throw std::invalid_argument unless the axis is well formed.
Definition at line 133 of file ParameterSearch.h.
|
inlineconstexpr |
Largest number of joint mixture nodes the product-Matérn moments under a non-diagonal Gaussian will evaluate. With the nodes of the accurate one-dimensional rule this admits two dimensions and no more.
Definition at line 371 of file BayesianQuadratureMoments.h.