Fleet  0.0.9
Inference in the LOT
Public Types | Public Member Functions | Public Attributes | List of all members
TNormalVariable< f > Class Template Reference

#include <TNormalVariable.h>

Inheritance diagram for TNormalVariable< f >:
Inheritance graph
[legend]
Collaboration diagram for TNormalVariable< f >:
Collaboration graph
[legend]

Public Types

using self_t = TNormalVariable< f >
 
using data_t = typename MCMCable< TNormalVariable< f >, void * >::data_t
 
- Public Types inherited from Bayesable< Args... >
typedef Args... datum_t
 
typedef std::vector< Args... > data_t
 

Public Member Functions

 TNormalVariable ()
 
template<typename T >
void set (T v)
 
float get () const
 Get interfaces to the transformed variable. More...
 
virtual double compute_prior () override
 
virtual double compute_likelihood (const data_t &data, const double breakout=-infinity) override
 
virtual std::optional< std::pair< self_t, double > > propose () const override
 
virtual self_t restart () const override
 
virtual size_t hash () const override
 
virtual bool operator== (const self_t &h) const override
 
virtual std::string string (std::string prefix="") const override
 
- Public Member Functions inherited from MCMCable< TNormalVariable< f >, void *>
 MCMCable ()
 
virtual bool operator!= (const TNormalVariable< f > &h) const
 
- Public Member Functions inherited from Bayesable< Args... >
 Bayesable ()
 
virtual double compute_single_likelihood (const datum_t &datum)
 Compute the likelihood of a single data point. More...
 
virtual void clear_bayes ()
 
virtual double compute_likelihood (const data_t &data, const double breakout=-infinity)
 Compute the likelihood of a collection of data, by calling compute_single_likelihood on each. This stops if our likelihood falls below breakout. More...
 
virtual double compute_posterior (const data_t &data, const std::pair< double, double > breakoutpair=std::make_pair(-infinity, 1.0))
 Compute the posterior, by calling prior and likelihood. This includes only a little bit of fanciness, which is that if our prior is -inf, then we don't both computing the likelihood. More...
 
virtual double at_temperature (double t) const
 
auto operator (const Bayesable< datum_t, data_t > &other) const
 
virtual void show (std::string prefix="")
 

Public Attributes

float MEAN = 0.0
 
float SD = 1.0
 
float PROPOSAL_SCALE = 0.10
 
bool can_propose
 
float value
 
float fvalue
 
- Public Attributes inherited from Bayesable< Args... >
double prior
 
double likelihood
 
double posterior
 
uintmax_t born
 
size_t born_chain_idx
 

Additional Inherited Members

- Static Public Member Functions inherited from MCMCable< TNormalVariable< f >, void *>
static TNormalVariable< f > sample ()
 Static function for making a hypothesis. Be careful using this with references because they may not foward right (for reasons that are unclear to me) More...
 

Detailed Description

template<float(*)(float) f>
class TNormalVariable< f >

Author
Steven Piantadosi
Date
11/09/20

Member Typedef Documentation

◆ data_t

template<float(*)(float) f>
using TNormalVariable< f >::data_t = typename MCMCable<TNormalVariable<f>, void*>::data_t

◆ self_t

template<float(*)(float) f>
using TNormalVariable< f >::self_t = TNormalVariable<f>

Constructor & Destructor Documentation

◆ TNormalVariable()

template<float(*)(float) f>
TNormalVariable< f >::TNormalVariable ( )
inline

Member Function Documentation

◆ compute_likelihood()

template<float(*)(float) f>
virtual double TNormalVariable< f >::compute_likelihood ( const data_t data,
const double  breakout = -infinity 
)
inlineoverridevirtual

◆ compute_prior()

template<float(*)(float) f>
virtual double TNormalVariable< f >::compute_prior ( )
inlineoverridevirtual

Implements Bayesable< Args... >.

◆ get()

template<float(*)(float) f>
float TNormalVariable< f >::get ( ) const
inline

Get interfaces to the transformed variable.

◆ hash()

template<float(*)(float) f>
virtual size_t TNormalVariable< f >::hash ( ) const
inlineoverridevirtual

Implements Bayesable< Args... >.

◆ operator==()

template<float(*)(float) f>
virtual bool TNormalVariable< f >::operator== ( const self_t h) const
inlineoverridevirtual

◆ propose()

template<float(*)(float) f>
virtual std::optional<std::pair<self_t,double> > TNormalVariable< f >::propose ( ) const
inlineoverridevirtual

◆ restart()

template<float(*)(float) f>
virtual self_t TNormalVariable< f >::restart ( ) const
inlineoverridevirtual

◆ set()

template<float(*)(float) f>
template<typename T >
void TNormalVariable< f >::set ( v)
inline

◆ string()

template<float(*)(float) f>
virtual std::string TNormalVariable< f >::string ( std::string  prefix = "") const
inlineoverridevirtual

Implements Bayesable< Args... >.

Member Data Documentation

◆ can_propose

template<float(*)(float) f>
bool TNormalVariable< f >::can_propose

◆ fvalue

template<float(*)(float) f>
float TNormalVariable< f >::fvalue

◆ MEAN

template<float(*)(float) f>
float TNormalVariable< f >::MEAN = 0.0

◆ PROPOSAL_SCALE

template<float(*)(float) f>
float TNormalVariable< f >::PROPOSAL_SCALE = 0.10

◆ SD

template<float(*)(float) f>
float TNormalVariable< f >::SD = 1.0

◆ value

template<float(*)(float) f>
float TNormalVariable< f >::value

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