LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lsst::afw::math::NeuralNetCovariogram< T > Class Template Reference

a Covariogram that recreates a neural network with one hidden layer and infinite units in that layer More...

#include <GaussianProcess.h>

Inheritance diagram for lsst::afw::math::NeuralNetCovariogram< T >:
lsst::afw::math::Covariogram< T >

Public Member Functions

 ~NeuralNetCovariogram () override
 
 NeuralNetCovariogram ()
 
void setSigma0 (double sigma0)
 set the _sigma0 hyper parameter
 
void setSigma1 (double sigma1)
 set the _sigma1 hyper parameter
 
operator() (ndarray::Array< const T, 1, 1 > const &, ndarray::Array< const T, 1, 1 > const &) const override
 Actually evaluate the covariogram function relating two points you want to interpolate from.
 

Detailed Description

template<typename T>
class lsst::afw::math::NeuralNetCovariogram< T >

a Covariogram that recreates a neural network with one hidden layer and infinite units in that layer

Contains two hyper parameters (_sigma0 and _sigma1) that characterize the expected variance of the function being interpolated

see Rasmussen and Williams (2006) http://www.gaussianprocess.org/gpml/ equation 4.29

Definition at line 193 of file GaussianProcess.h.

Constructor & Destructor Documentation

◆ ~NeuralNetCovariogram()

template<typename T >
lsst::afw::math::NeuralNetCovariogram< T >::~NeuralNetCovariogram ( )
overridedefault

◆ NeuralNetCovariogram()

template<typename T >
lsst::afw::math::NeuralNetCovariogram< T >::NeuralNetCovariogram ( )
explicit

Definition at line 2025 of file GaussianProcess.cc.

2025 {
2026 _sigma0 = 1.0;
2027 _sigma1 = 1.0;
2028}

Member Function Documentation

◆ operator()()

template<typename T >
T lsst::afw::math::NeuralNetCovariogram< T >::operator() ( ndarray::Array< const T, 1, 1 > const & p1,
ndarray::Array< const T, 1, 1 > const & p2 ) const
overridevirtual

Actually evaluate the covariogram function relating two points you want to interpolate from.

Parameters
[in]p1the first point
[in]p2the second point

Reimplemented from lsst::afw::math::Covariogram< T >.

Definition at line 2031 of file GaussianProcess.cc.

2032 {
2033 int i, dim;
2034 double num, denom1, denom2, arg;
2035
2036 dim = p1.template getSize<0>();
2037
2038 num = 2.0 * _sigma0;
2039 denom1 = 1.0 + 2.0 * _sigma0;
2040 denom2 = 1.0 + 2.0 * _sigma0;
2041
2042 for (i = 0; i < dim; i++) {
2043 num += 2.0 * p1[i] * p2[i] * _sigma1;
2044 denom1 += 2.0 * p1[i] * p1[i] * _sigma1;
2045 denom2 += 2.0 * p2[i] * p2[i] * _sigma1;
2046 }
2047
2048 arg = num / ::sqrt(denom1 * denom2);
2049 return T(2.0 * (::asin(arg)) / 3.141592654);
2050}
T asin(T... args)
T sqrt(T... args)

◆ setSigma0()

template<typename T >
void lsst::afw::math::NeuralNetCovariogram< T >::setSigma0 ( double sigma0)

set the _sigma0 hyper parameter

Definition at line 2053 of file GaussianProcess.cc.

2053 {
2054 _sigma0 = sigma0;
2055}

◆ setSigma1()

template<typename T >
void lsst::afw::math::NeuralNetCovariogram< T >::setSigma1 ( double sigma1)

set the _sigma1 hyper parameter

Definition at line 2058 of file GaussianProcess.cc.

2058 {
2059 _sigma1 = sigma1;
2060}
table::Key< double > sigma1

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