BIE::Prior Class Reference

Implement Gaussian, uniform and Weibull priors for a multiple component Bayesian prior. More...

#include <Prior.h>

Inheritance diagram for BIE::Prior:
Collaboration diagram for BIE::Prior:

List of all members.

Public Member Functions

Constructors
 Prior ()
 For cloning only: makes an uninitialized prior.
 Prior (Prior *p)
 Copy constructor.
 Prior (string pfile)
 The originating constructor.
 ~Prior ()
 Destructor.
Distribution members
PriorNew ()
 Object factor (clone).
virtual double PDF (State &)
 Differential distribution function P(x).
virtual double logPDF (State &)
 Log of differential distribution function P(x).
virtual vector< double > lower (void)
 Lower bound on distribution (in each dimension).
virtual vector< double > upper (void)
 Upper bound on distribution (in each dimension).
virtual vector< double > Mean (void)
 Return mean of distribution (mulitvariate).
virtual vector< double > StdDev (void)
 Return standard deviation of distribution (mulitvariate).
virtual vector< double > Moments (int)
 Return specifided moment of distribution (mulitvariate).
virtual vector< double > Sample (void)
 Return random variate from distribution.

Protected Attributes

int Ndim
 Dimension of parameter vector.
vector< Distribution * > _dist
 Hold the distribution for variates in each dimension.
vector< int > _type
 Type of distribution for each dimension.
State v1
 Temporary state storage.

Friends

class boost::serialization::access


Detailed Description

Implement Gaussian, uniform and Weibull priors for a multiple component Bayesian prior.

The constructor uses an input file to define the distribution for each element of the parameter vector.

The input parameter file format is as follows. You need one line for every dimension, 1 to Ndim. Each line must have the format Param1 Param2 Param3 Param4 type The current types are:

  • Uniform distribution [0]
    • Param 1: lower limit
    • Param 2: upper limit
  • Gaussian distribution [1]
    • Param 1: mean
    • Param 2: variance
  • Gaussian distribution with upper and lower limits [2]
    • Param 1: mean
    • Param 2: variance
    • Param 3: lower limit
    • Param 4: upper limit
  • Exponential distribution [3]
    • Param 1: exponent $\alpha$
  • Exponential with upper and lower limits [4]
    • Param 1: exponent $\alpha$
    • Param 2: lower limit
    • Param 3: upper limit
  • Weibull distribution [5]
    • Param 1: exponent $\alpha$
    • Param 2: shape parameter $\beta$
  • Weibull distribution with limits [6]
    • Param 1: exponent $\alpha$
    • Param 2: shape parameter $\beta$
    • Param 3: lower limit
    • Param 4: upper limit

The integers in brackets [] is the integer type value. Each line must have 4 parameter values even if these are not used by the particular distribution type. For example, a uniform prior in the interval [-1, 2] would have the following input line:

-1.0 2.0 0.0 0.0 0


The documentation for this class was generated from the following file:
  • /home/weinberg/src/BIE/include/Prior.h

Send suggestions, questions, and feedback to WEINBERG at ASTRO dot UMASS dot EDU.
Documentation generated at Fri Mar 26 00:35:12 2010 by doxygen