LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Private Attributes | 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 > lsst::daf::base::Citizen

Public Member Functions

virtual ~NeuralNetCovariogram ()
 
 NeuralNetCovariogram ()
 
void setSigma0 (double sigma0)
 set the _sigma0 hyper parameter More...
 
void setSigma1 (double sigma1)
 set the _sigma1 hyper parameter More...
 
virtual T operator() (ndarray::Array< const T, 1, 1 > const &, ndarray::Array< const T, 1, 1 > const &) const
 Actually evaluate the covariogram function relating two points you want to interpolate from. More...
 
- Public Member Functions inherited from lsst::afw::math::Covariogram< T >
virtual ~Covariogram ()
 
 Covariogram ()
 construct a Covariogram assigning default values to the hyper parameters More...
 
- Public Member Functions inherited from lsst::daf::base::Citizen
 Citizen (const std::type_info &)
 
 Citizen (Citizen const &)
 
 ~Citizen ()
 
Citizenoperator= (Citizen const &)
 
std::string repr () const
 Return a string representation of a Citizen. More...
 
void markPersistent (void)
 Mark a Citizen as persistent and not destroyed until process end. More...
 
memId getId () const
 Return the Citizen's ID. More...
 

Private Attributes

double _sigma0
 
double _sigma1
 

Additional Inherited Members

- Public Types inherited from lsst::daf::base::Citizen
enum  { magicSentinel = 0xdeadbeef }
 
typedef unsigned long memId
 Type of the block's ID. More...
 
typedef memId(* memNewCallback )(const memId cid)
 A function used to register a callback. More...
 
typedef memId(* memCallback )(const Citizen *ptr)
 
- Static Public Member Functions inherited from lsst::daf::base::Citizen
static bool hasBeenCorrupted ()
 Check all allocated blocks for corruption. More...
 
static memId getNextMemId ()
 Return the memId of the next object to be allocated. More...
 
static int init ()
 Called once when the memory system is being initialised. More...
 
static int census (int, memId startingMemId=0)
 How many active Citizens are there? More...
 
static void census (std::ostream &stream, memId startingMemId=0)
 Print a list of all active Citizens to stream, sorted by ID. More...
 
static const std::vector
< const Citizen * > * 
census ()
 Return a (newly allocated) std::vector of active Citizens sorted by ID. More...
 
static memId setNewCallbackId (memId id)
 Call the NewCallback when block is allocated. More...
 
static memId setDeleteCallbackId (memId id)
 Call the current DeleteCallback when block is deleted. More...
 
static memNewCallback setNewCallback (memNewCallback func)
 Set the NewCallback function. More...
 
static memCallback setDeleteCallback (memCallback func)
 Set the DeleteCallback function. More...
 
static memCallback setCorruptionCallback (memCallback func)
 Set the CorruptionCallback function. More...
 

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 203 of file GaussianProcess.h.

Constructor & Destructor Documentation

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

Definition at line 1863 of file GaussianProcess.cc.

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

Definition at line 1866 of file GaussianProcess.cc.

1866  {
1867 
1868  _sigma0 = 1.0;
1869  _sigma1 = 1.0;
1870 }

Member Function Documentation

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
virtual

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 1873 of file GaussianProcess.cc.

1876 {
1877  int i,dim;
1878  double num,denom1,denom2,arg;
1879 
1880  dim = p1.template getSize < 0 > ();
1881 
1882  num = 2.0*_sigma0;
1883  denom1 = 1.0 + 2.0*_sigma0;
1884  denom2 = 1.0 + 2.0*_sigma0;
1885 
1886  for(i = 0; i < dim; i++ ) {
1887  num += 2.0*p1[i]*p2[i]*_sigma1;
1888  denom1 += 2.0*p1[i]*p1[i]*_sigma1;
1889  denom2 += 2.0*p2[i]*p2[i]*_sigma1;
1890  }
1891 
1892  arg = num/::sqrt(denom1*denom2);
1893  return T(2.0*(::asin(arg))/3.141592654);
1894 
1895 }
template<typename T >
void lsst::afw::math::NeuralNetCovariogram< T >::setSigma0 ( double  sigma0)

set the _sigma0 hyper parameter

Definition at line 1898 of file GaussianProcess.cc.

1899 {
1900  _sigma0 = sigma0;
1901 }
template<typename T >
void lsst::afw::math::NeuralNetCovariogram< T >::setSigma1 ( double  sigma1)

set the _sigma1 hyper parameter

Definition at line 1904 of file GaussianProcess.cc.

1905 {
1906  _sigma1 = sigma1;
1907 }
afw::table::Key< double > sigma1

Member Data Documentation

template<typename T >
double lsst::afw::math::NeuralNetCovariogram< T >::_sigma0
private

Definition at line 225 of file GaussianProcess.h.

template<typename T >
double lsst::afw::math::NeuralNetCovariogram< T >::_sigma1
private

Definition at line 225 of file GaussianProcess.h.


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