Fleet  0.0.9
Inference in the LOT
Public Types | Public Member Functions | Public Attributes | List of all members
VectorHalfNormalHypothesis Class Reference

#include <VectorHalfNormalHypothesis.h>

Inheritance diagram for VectorHalfNormalHypothesis:
Inheritance graph
[legend]
Collaboration diagram for VectorHalfNormalHypothesis:
Collaboration graph
[legend]

Public Types

using self_t = VectorHalfNormalHypothesis
 
- Public Types inherited from Bayesable< Args... >
typedef Args... datum_t
 
typedef std::vector< Args... > data_t
 

Public Member Functions

 VectorHalfNormalHypothesis ()
 
 VectorHalfNormalHypothesis (int n)
 
double operator() (int i) const
 
void set (int i, double v)
 
void set_can_propose (size_t i, bool b)
 Set whether we can propose to each element of b or not. More...
 
void set_size (size_t n)
 
size_t size () const
 
virtual double compute_prior () override
 
virtual double compute_likelihood (const data_t &data, const double breakout=-infinity) override
 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 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< VectorHalfNormalHypothesis, void *>
 MCMCable ()
 
virtual bool operator!= (const VectorHalfNormalHypothesis &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_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

double MEAN = 0.0
 
double SD = 1.0
 
double PROPOSAL_SCALE = 0.20
 
Vector value
 
std::vector< bool > can_propose
 
- 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< VectorHalfNormalHypothesis, void *>
static VectorHalfNormalHypothesis 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

Author
Steven Piantadosi
Date
13/07/21

Member Typedef Documentation

◆ self_t

Constructor & Destructor Documentation

◆ VectorHalfNormalHypothesis() [1/2]

VectorHalfNormalHypothesis::VectorHalfNormalHypothesis ( )
inline

◆ VectorHalfNormalHypothesis() [2/2]

VectorHalfNormalHypothesis::VectorHalfNormalHypothesis ( int  n)
inline

Member Function Documentation

◆ compute_likelihood()

virtual double VectorHalfNormalHypothesis::compute_likelihood ( const data_t data,
const double  breakout = -infinity 
)
inlineoverridevirtual

Compute the likelihood of a collection of data, by calling compute_single_likelihood on each. This stops if our likelihood falls below breakout.

Parameters
data
breakout
Returns

Reimplemented from Bayesable< Args... >.

◆ compute_prior()

virtual double VectorHalfNormalHypothesis::compute_prior ( )
inlineoverridevirtual

Implements Bayesable< Args... >.

◆ hash()

virtual size_t VectorHalfNormalHypothesis::hash ( ) const
inlineoverridevirtual

Implements Bayesable< Args... >.

◆ operator()()

double VectorHalfNormalHypothesis::operator() ( int  i) const
inline

◆ operator==()

virtual bool VectorHalfNormalHypothesis::operator== ( const self_t h) const
inlineoverridevirtual

◆ propose()

virtual std::optional<std::pair<self_t,double> > VectorHalfNormalHypothesis::propose ( ) const
inlineoverridevirtual

◆ restart()

virtual self_t VectorHalfNormalHypothesis::restart ( ) const
inlineoverridevirtual

◆ set()

void VectorHalfNormalHypothesis::set ( int  i,
double  v 
)
inline

◆ set_can_propose()

void VectorHalfNormalHypothesis::set_can_propose ( size_t  i,
bool  b 
)
inline

Set whether we can propose to each element of b or not.

Parameters
i

◆ set_size()

void VectorHalfNormalHypothesis::set_size ( size_t  n)
inline

◆ size()

size_t VectorHalfNormalHypothesis::size ( ) const
inline

◆ string()

virtual std::string VectorHalfNormalHypothesis::string ( std::string  prefix = "") const
inlineoverridevirtual

Implements Bayesable< Args... >.

Member Data Documentation

◆ can_propose

std::vector<bool> VectorHalfNormalHypothesis::can_propose

◆ MEAN

double VectorHalfNormalHypothesis::MEAN = 0.0

◆ PROPOSAL_SCALE

double VectorHalfNormalHypothesis::PROPOSAL_SCALE = 0.20

◆ SD

double VectorHalfNormalHypothesis::SD = 1.0

◆ value

Vector VectorHalfNormalHypothesis::value

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