IMP Reference Guide
2.21.0
The Integrative Modeling Platform
|
GaussianProcessInterpolation. More...
#include <IMP/isd/GaussianProcessInterpolation.h>
This class provides methods to perform bayesian interpolation/smoothing of data using a gaussian process prior on the function to be interpolated. It takes a dataset as input (via its sufficient statistics) along with prior mean and covariance functions. It outputs the value of the posterior mean and covariance functions at points requested by the user.
Definition at line 32 of file GaussianProcessInterpolation.h.
Public Member Functions | |
GaussianProcessInterpolation (FloatsList x, Floats sample_mean, Floats sample_std, unsigned n_obs, UnivariateFunction *mean_function, BivariateFunction *covariance_function, Particle *sigma, double sparse_cutoff=1e-7) | |
void | force_covariance_update () |
void | force_mean_update () |
FloatsList | get_data_abscissa () const |
Floats | get_data_mean () const |
FloatsList | get_data_variance () const |
ModelObjectsTemp | get_inputs () const |
bool | get_m_particle_is_optimized (unsigned i) const |
unsigned | get_number_of_m_particles () const |
unsigned | get_number_of_Omega_particles () const |
bool | get_Omega_particle_is_optimized (unsigned i) const |
double | get_posterior_covariance (Floats x1, Floats x2) const |
Eigen::VectorXd | get_posterior_covariance_derivative (Floats x) const |
Floats | get_posterior_covariance_derivative (Floats x, bool) const |
Eigen::MatrixXd | get_posterior_covariance_hessian (Floats x) const |
FloatsList | get_posterior_covariance_hessian (Floats x, bool) const |
Eigen::MatrixXd | get_posterior_covariance_matrix (FloatsList x) const |
FloatsList | get_posterior_covariance_matrix (FloatsList x, bool) const |
double | get_posterior_mean (Floats x) const |
virtual std::string | get_type_name () const override |
virtual ::IMP::VersionInfo | get_version_info () const override |
Get information about the module and version of the object. More... | |
Public Member Functions inherited from IMP::Object | |
virtual void | clear_caches () |
CheckLevel | get_check_level () const |
LogLevel | get_log_level () const |
void | set_check_level (CheckLevel l) |
void | set_log_level (LogLevel l) |
Set the logging level used in this object. More... | |
void | set_was_used (bool tf) const |
void | show (std::ostream &out=std::cout) const |
const std::string & | get_name () const |
void | set_name (std::string name) |
Protected Member Functions | |
void | add_to_m_particle_derivative (unsigned particle, double value, DerivativeAccumulator &accum) |
void | add_to_Omega_particle_derivative (unsigned particle, double value, DerivativeAccumulator &accum) |
Eigen::VectorXd | get_I () const |
Eigen::LDLT< Eigen::MatrixXd, Eigen::Upper > | get_ldlt () const |
Eigen::VectorXd | get_m () const |
Eigen::VectorXd | get_m_derivative (unsigned particle) const |
Eigen::VectorXd | get_m_second_derivative (unsigned particle1, unsigned particle2) const |
Eigen::MatrixXd | get_Omega () const |
Eigen::MatrixXd | get_Omega_derivative (unsigned particle) const |
Eigen::MatrixXd | get_Omega_second_derivative (unsigned particle1, unsigned particle2) const |
Eigen::MatrixXd | get_Omi () const |
Eigen::VectorXd | get_OmiIm () const |
Eigen::DiagonalMatrix< double, Eigen::Dynamic > | get_S () const |
Eigen::MatrixXd | get_W () const |
Eigen::VectorXd | get_wx_vector (Floats xval) const |
Protected Member Functions inherited from IMP::Object | |
Object (std::string name) | |
Construct an object with the given name. More... | |
virtual void | do_destroy () |
IMP::isd::GaussianProcessInterpolation::GaussianProcessInterpolation | ( | FloatsList | x, |
Floats | sample_mean, | ||
Floats | sample_std, | ||
unsigned | n_obs, | ||
UnivariateFunction * | mean_function, | ||
BivariateFunction * | covariance_function, | ||
Particle * | sigma, | ||
double | sparse_cutoff = 1e-7 |
||
) |
Constructor for the gaussian process
[in] | x | : a list of coordinates in N-dimensional space corresponding to the abscissa of each observation |
[in] | sample_mean | \(I\) : vector of mean observations at each of the previously defined coordinates |
[in] | sample_std | \(s\) : vector of sample standard deviations |
[in] | n_obs | \(N\) : sample size for mean and std |
[in] | mean_function | \(m\) : a pointer to the prior mean function to use. Should be compatible with the size of x(i). |
[in] | covariance_function | \(w\): prior covariance function. |
[in] | sigma | : ISD Scale (proportionality factor to S) |
[in] | sparse_cutoff | : when to consider that a matrix entry is zero |
Computes the necessary matrices and inverses when called.
double IMP::isd::GaussianProcessInterpolation::get_posterior_mean | ( | Floats | x | ) | const |
Get posterior mean and covariance functions, at the points requested Posterior mean is defined as
\[\hat{I}(x) = m(x) + {}^t\mathbf{w}(q) (\mathbf{W}+\mathbf{S})^{-1} (\mathbf{I}-\mathbf{m}) \]
Posterior covariance
\[\hat{\sigma}^2(x,x') = w(x,x') - {}^t\mathbf{w}(x) (\mathbf{W} + \mathbf{S})^{-1} \mathbf{w}(x') \]
where \(\mathbf{m}\) is the vector built by evaluating the prior mean function at the observation points; \(\mathbf{w}(x)\) is the vector of covariances between each observation point and the current point; \(\mathbf{W}\) is the prior covariance matrix built by evaluating the covariance function at each of the observations; \(\mathbf{S}\) is the diagonal covariance matrix built from sample_std and n_obs.
Both functions will check if the mean or covariance functions have changed since the last call, and will recompute \((\mathbf{W} + \mathbf{S})^{-1}\) if necessary.
|
overridevirtual |
Get information about the module and version of the object.
Reimplemented from IMP::Object.
Definition at line 145 of file GaussianProcessInterpolation.h.