BIE::MixturePrior Class Reference

Abstract class. More...

#include <MixturePrior.h>

Inheritance diagram for BIE::MixturePrior:
Collaboration diagram for BIE::MixturePrior:

List of all members.

Public Member Functions

void setMaxIter (int i)
 Set maximum number of iterations in state sampler to generate a state within the desired bounds.
void setMinMaxWeight (double minw, double maxw)
 Set the minimum and maximum weight values.
void getMinMaxWeight (double &minw, double &maxw)
 Return the minimum and maximum weights.
virtual void SamplePrior (int &, vector< double > &, vector< vector< double > > &)=0
 Sample: return weights and components separately.
virtual void SamplePrior (int, int, vector< double > &)=0
 Sample: a parameter vector for a single component in a subspace.
virtual void SampleProposal (Chain &ch, MHWidth *width)
 Based on prior type, return random variates for mixture model.
virtual double BirthWeight (int M)
 Choose a new component weight conditional on old weights.
virtual double BirthWeightPDF (int M, double p)
 Probability of new weight and old weights.
virtual int MinC ()
 Minimum number of components.
virtual int MaxC ()
 Maximum number of components.
virtual void setOrdering (int icomp)
 Set ordering parameters.
virtual void unsetOrdering ()
 Remove ordering.
virtual bool Order ()
 Return ordering flag.
virtual int Oindx ()
 Return parameter index for ordering.
Constructors
 MixturePrior ()
 For cloning only: makes an uninitialized prior.
 MixturePrior (MixturePrior *)
 Copy constructor for derived classes.
 MixturePrior (int nmix, string pfile)
 The useful constructor.
 MixturePrior (int nmix, double alpha, string pfile)
 The even more useful constructor.
 MixturePrior (int nmix, double alpha, double pmean, string pfile)
 Constructor for a variable number of components.
 ~MixturePrior ()
 Destructor.
Distribution members
The packing order in vectors is: Nmix weights, followed by Nmix vectors of Ndim elements

virtual MixturePriorNew ()=0
 Object factor (clone).
virtual double PDF (State &)=0
 Differential distribution function P(x).
virtual double logPDF (State &)=0
 Log of differential distribution function P(x).
virtual double logPDFMarginal (int M, int n, vector< double > &V)=0
 Log of differential distribution function P(x) for subspace.
virtual vector< double > lower (void)=0
 Lower bound on distribution.
virtual vector< double > upper (void)=0
 Upper bound on distribution.
virtual int SampleM (void)
 Sample the number of components.
virtual vector< double > Sample (void)
 Return random variate for variable dimension model.
virtual vector< double > Sample (int m)=0
 Return random variate from distribution.

Static Public Attributes

static unsigned ITMAX
 Maximum number of tries to find a good state.
static double min_prob
 Very small but non-zero probability "epsilon".

Protected Member Functions

double GenGamma (double a)
 Gamma-distributed variates.
double GenBeta (double a, double b)
 Beta-distributed variates.

Protected Attributes

bool Ordered
 Is the mixtured ordered to break the label switching?
int Iorder
 The index of the parameter to order.
int Nmix
 Number of components in the mixture.
vector< double > ret
 Return vectore.
double Alpha
 Dirichlet distribution parameter.
vector< Dirichlet * > mix
 One distribution for each dimension.
Uniform * unit
 Uniform random variates in [-1.0, 1.0].
Uniform * useg
 Uniform random variates in [0.0, 1.0].
Normal * normal
 Normal with zero mean and unit variance.
double pmean
 Poisson distribution mean.
Poisson * pois
 Poisson distribution.
double minW
 Minimum and maximum weight values (default: 0, 1).
double maxW

Friends

class boost::serialization::access


Detailed Description

Abstract class.

A prior for a mixture model.

The prior for the mixture parameters will be the Dirichlet distribution. See the Prior class for a definition of distribution types for each element of the model parameter vector.


Constructor & Destructor Documentation

BIE::MixturePrior::MixturePrior ( int  nmix,
string  pfile 
)

The useful constructor.

Parameters:
nmix is the number of components in the mixture
pfile is defintion of the prior distribution for parameter vector

BIE::MixturePrior::MixturePrior ( int  nmix,
double  alpha,
string  pfile 
)

The even more useful constructor.

Parameters:
alpha is the Dirichlet distribution parameter

BIE::MixturePrior::MixturePrior ( int  nmix,
double  alpha,
double  pmean,
string  pfile 
)

Constructor for a variable number of components.

Parameters:
pmean is Poisson mean for the prior distribution of components


Member Function Documentation

virtual double BIE::MixturePrior::logPDFMarginal ( int  M,
int  n,
vector< double > &  V 
) [pure virtual]

Log of differential distribution function P(x) for subspace.

Parameters:
M and component
n for parameter vector
V This method is used for ReversibleJump classes.

Implemented in BIE::InitialMixturePrior, and BIE::PostMixturePrior.

virtual void BIE::MixturePrior::setOrdering ( int  icomp  )  [inline, virtual]

Set ordering parameters.

The otherwise identical mixture components are ordered by a particular value to remove the Nmix!-fold degeneracy (the so-called labelling problem). The value icomp is rank in the parameter vector to be ordered icomp=-1 signals ordering on the weight value.


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

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