IMP  2.2.1
The Integrative Modeling Platform
IMP::isd::GaussianProcessInterpolation Class Reference

GaussianProcessInterpolation. More...

#include <IMP/isd/GaussianProcessInterpolation.h>

+ Inheritance diagram for IMP::isd::GaussianProcessInterpolation:

Public Member Functions

 GaussianProcessInterpolation (FloatsList x, Floats sample_mean, Floats sample_std, unsigned n_obs, UnivariateFunction *mean_function, BivariateFunction *covariance_function, kernel::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
 
ContainersTemp get_input_containers () const
 
kernel::ParticlesTemp get_input_particles () 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
 
IMP_Eigen::VectorXd get_posterior_covariance_derivative (Floats x) const
 
Floats get_posterior_covariance_derivative (Floats x, bool) const
 
IMP_Eigen::MatrixXd get_posterior_covariance_hessian (Floats x) const
 
FloatsList get_posterior_covariance_hessian (Floats x, bool) const
 
IMP_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
 
virtual ::IMP::base::VersionInfo get_version_info () const
 Get information about the module and version of the object.
 
- Public Member Functions inherited from IMP::base::Object
virtual void clear_caches ()
 
virtual void do_destroy ()
 
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)
 
IMP_Eigen::VectorXd get_I () const
 
IMP_Eigen::LDLT
< IMP_Eigen::MatrixXd,
IMP_Eigen::Upper > 
get_ldlt () const
 
IMP_Eigen::VectorXd get_m () const
 
IMP_Eigen::VectorXd get_m_derivative (unsigned particle) const
 
IMP_Eigen::VectorXd get_m_second_derivative (unsigned particle1, unsigned particle2) const
 
IMP_Eigen::MatrixXd get_Omega () const
 
IMP_Eigen::MatrixXd get_Omega_derivative (unsigned particle) const
 
IMP_Eigen::MatrixXd get_Omega_second_derivative (unsigned particle1, unsigned particle2) const
 
IMP_Eigen::MatrixXd get_Omi () const
 
IMP_Eigen::VectorXd get_OmiIm () const
 
IMP_Eigen::DiagonalMatrix
< double, IMP_Eigen::Dynamic > 
get_S () const
 
IMP_Eigen::MatrixXd get_W () const
 
IMP_Eigen::VectorXd get_wx_vector (Floats xval) const
 
- Protected Member Functions inherited from IMP::base::Object
 Object (std::string name)
 Construct an object with the given name. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

IMP::isd::GaussianProcessInterpolation::GaussianProcessInterpolation ( FloatsList  x,
Floats  sample_mean,
Floats  sample_std,
unsigned  n_obs,
UnivariateFunction mean_function,
BivariateFunction covariance_function,
kernel::Particle sigma,
double  sparse_cutoff = 1e-7 
)

Constructor for the gaussian process

Parameters
[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.

Member Function Documentation

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.


The documentation for this class was generated from the following file: