UQTk: Uncertainty Quantification Toolkit 3.1.5
Post Class Reference

posterior evaluation with various likelihood and prior options More...

#include <post.h>

Inheritance diagram for Post:
Lik_ABC Lik_ABCm Lik_Classical Lik_Eov Lik_Full Lik_GausMarg Lik_GausMargD Lik_Koh Lik_MVN Lik_Marg

Public Member Functions

 Post ()
 Constructor.
 
 ~Post ()
 Destructor.
 
void setData (Array2D< double > &xdata, Array2D< double > &ydata)
 Set the x- and y-data.
 
void setData (Array2D< double > &xdata, Array1D< Array1D< double > > &ydata)
 Set the x- and y-data, for the case when each datapoint have different number of measurements.
 
void setDataNoise (Array1D< double > &sigma)
 Set the magnitude of data noise.
 
void inferDataNoise ()
 Indicate inference of data noise stdev.
 
void inferLogDataNoise ()
 Indicate inference of log of data noise stdev.
 
Array1D< double > dataSigma (double m_last)
 Get data noise, whether inferred or fixed.
 
void setModel (Array1D< Array2D< double >(*)(Array2D< double > &, Array2D< double > &, Array2D< double > &, void *) > forwardFuncs, Array2D< double > &fixindnom, void *funcInfo)
 Set a pointer to the forward model f(p,x)
 
void setModelRVinput (int pdim, int order, Array1D< int > &rndInd, string pdfType, string pcType)
 Set model input parameters' randomization scheme.
 
int getChainDim ()
 Get the dimensionailty of the posterior function.
 
void setPrior (string priorType, double priora, double priorb)
 Set the prior type and its parameters.
 
double evalLogPrior (Array1D< double > &m)
 Evaluate log-prior.
 
Array2D< double > getParamPCcf (Array1D< double > &m)
 Extract parameter PC coefficients from a posterior input.
 
Array2D< double > samParam (Array1D< double > &m, int ns)
 Sample model parameters given posterior input.
 
void momParam (Array1D< double > &m, Array1D< double > &parMean, Array1D< double > &parVar, bool covFlag, Array2D< double > &parCov)
 Get moments of parameters given posterior input.
 
Array2D< double > samForwardFcn (Array2D< double >(*forwardFunc)(Array2D< double > &, Array2D< double > &, Array2D< double > &, void *), Array1D< double > &m, Array2D< double > &xgrid, int ns)
 Sample forward function at a given grid for given posterior input.
 
void momForwardFcn (Array2D< double >(*forwardFunc)(Array2D< double > &, Array2D< double > &, Array2D< double > &, void *), Array1D< double > &m, Array2D< double > &xgrid, Array1D< double > &fcnMean, Array1D< double > &fcnVar, bool covflag, Array2D< double > &fcnCov)
 Get moments of forward function at a given grid for given posterior input.
 
void momForwardFcn (Array1D< double > &m, Array2D< double > &xgrid, Array1D< double > &fcnMean, Array1D< double > &fcnVar, bool covflag, Array2D< double > &fcnCov)
 Get moments of composite forward function at a given grid for given posterior input.
 
virtual double evalLogLik (Array1D< double > &m)
 Dummy evaluation of log-likelihood.
 

Protected Attributes

Array2D< double > xData_
 xdata
 
Array1D< Array1D< double > > yData_
 ydata
 
Array1D< double > yDatam_
 ydata averaged per measurement
 
int nData_
 Number of data points.
 
Array1D< int > nEachs_
 Number of samples at each input.
 
int xDim_
 Dimensionality of x-space.
 
int pDim_
 Dimensionality of parameter space (p-space)
 
int chDim_
 Dimensionality of posterior input.
 
bool inferDataNoise_
 Flag for data noise inference.
 
bool dataNoiseLogFlag_
 Flag to check if data noise logarithm is used.
 
Array1D< double > dataNoiseSig_
 Data noise stdev.
 
Array1D< Array2D< double >(*)(Array2D< double > &, Array2D< double > &, Array2D< double > &, void *) > forwardFcns_
 Pointer to the forward function f(p,x)
 
void * funcinfo_
 Auxiliary information for function evaluation.
 
int extraInferredParams_
 Number of extra inferred parameters, such as data noise or Koh variance.
 
int ncat_
 Number of categories.
 
MrvMrv_
 Pointer to a multivariate PC RV object.
 
Array1D< int > rndInd_
 Indices of randomized inputs.
 
Array2D< double > fixIndNom_
 Indices and nominal values for fixed inputs.
 
Array1D< double > lower_
 Lower and upper bounds on parameters.
 
Array1D< double > upper_
 
string pdfType_
 Input parameter PDF type.
 
string rvpcType_
 PC type parameter for the r.v.
 
string priorType_
 Prior type.
 
double priora_
 Prior parameter #1.
 
double priorb_
 Prior parameter #2.
 

Private Attributes

int verbosity_
 Verbosity level.
 

Detailed Description

posterior evaluation with various likelihood and prior options

Constructor & Destructor Documentation

◆ Post()

Post::Post ( )

Constructor.

◆ ~Post()

Post::~Post ( )
inline

Destructor.

Member Function Documentation

◆ dataSigma()

Array1D< double > Post::dataSigma ( double m_last)

Get data noise, whether inferred or fixed.

◆ evalLogLik()

virtual double Post::evalLogLik ( Array1D< double > & m)
inlinevirtual

Dummy evaluation of log-likelihood.

Reimplemented in Lik_ABC, Lik_ABCm, Lik_Classical, Lik_Eov, Lik_Full, Lik_GausMarg, Lik_GausMargD, Lik_Koh, Lik_Marg, and Lik_MVN.

◆ evalLogPrior()

double Post::evalLogPrior ( Array1D< double > & m)

Evaluate log-prior.

◆ getChainDim()

int Post::getChainDim ( )

Get the dimensionailty of the posterior function.

◆ getParamPCcf()

Array2D< double > Post::getParamPCcf ( Array1D< double > & m)

Extract parameter PC coefficients from a posterior input.

◆ inferDataNoise()

void Post::inferDataNoise ( )

Indicate inference of data noise stdev.

◆ inferLogDataNoise()

void Post::inferLogDataNoise ( )

Indicate inference of log of data noise stdev.

◆ momForwardFcn() [1/2]

void Post::momForwardFcn ( Array1D< double > & m,
Array2D< double > & xgrid,
Array1D< double > & fcnMean,
Array1D< double > & fcnVar,
bool covflag,
Array2D< double > & fcnCov )

Get moments of composite forward function at a given grid for given posterior input.

◆ momForwardFcn() [2/2]

void Post::momForwardFcn ( Array2D< double >(* forwardFunc )(Array2D< double > &, Array2D< double > &, Array2D< double > &, void *),
Array1D< double > & m,
Array2D< double > & xgrid,
Array1D< double > & fcnMean,
Array1D< double > & fcnVar,
bool covflag,
Array2D< double > & fcnCov )

Get moments of forward function at a given grid for given posterior input.

◆ momParam()

void Post::momParam ( Array1D< double > & m,
Array1D< double > & parMean,
Array1D< double > & parVar,
bool covFlag,
Array2D< double > & parCov )

Get moments of parameters given posterior input.

◆ samForwardFcn()

Array2D< double > Post::samForwardFcn ( Array2D< double >(* forwardFunc )(Array2D< double > &, Array2D< double > &, Array2D< double > &, void *),
Array1D< double > & m,
Array2D< double > & xgrid,
int ns )

Sample forward function at a given grid for given posterior input.

◆ samParam()

Array2D< double > Post::samParam ( Array1D< double > & m,
int ns )

Sample model parameters given posterior input.

◆ setData() [1/2]

void Post::setData ( Array2D< double > & xdata,
Array1D< Array1D< double > > & ydata )

Set the x- and y-data, for the case when each datapoint have different number of measurements.

◆ setData() [2/2]

void Post::setData ( Array2D< double > & xdata,
Array2D< double > & ydata )

Set the x- and y-data.

◆ setDataNoise()

void Post::setDataNoise ( Array1D< double > & sigma)

Set the magnitude of data noise.

◆ setModel()

void Post::setModel ( Array1D< Array2D< double >(* forwardFuncs )(Array2D< double > &, Array2D< double > &, Array2D< double > &, void *) >,
Array2D< double > & fixindnom,
void * funcInfo )

Set a pointer to the forward model f(p,x)

◆ setModelRVinput()

void Post::setModelRVinput ( int pdim,
int order,
Array1D< int > & rndInd,
string pdfType,
string pcType )

Set model input parameters' randomization scheme.

◆ setPrior()

void Post::setPrior ( string priorType,
double priora,
double priorb )

Set the prior type and its parameters.

Member Data Documentation

◆ chDim_

int Post::chDim_
protected

Dimensionality of posterior input.

◆ dataNoiseLogFlag_

bool Post::dataNoiseLogFlag_
protected

Flag to check if data noise logarithm is used.

◆ dataNoiseSig_

Array1D<double> Post::dataNoiseSig_
protected

Data noise stdev.

◆ extraInferredParams_

int Post::extraInferredParams_
protected

Number of extra inferred parameters, such as data noise or Koh variance.

◆ fixIndNom_

Array2D<double> Post::fixIndNom_
protected

Indices and nominal values for fixed inputs.

◆ forwardFcns_

Array1D< Array2D<double>(*)(Array2D<double>&, Array2D<double>&, Array2D<double>&, void *) > Post::forwardFcns_
protected

Pointer to the forward function f(p,x)

◆ funcinfo_

void* Post::funcinfo_
protected

Auxiliary information for function evaluation.

◆ inferDataNoise_

bool Post::inferDataNoise_
protected

Flag for data noise inference.

◆ lower_

Array1D<double> Post::lower_
protected

Lower and upper bounds on parameters.

◆ Mrv_

Mrv* Post::Mrv_
protected

Pointer to a multivariate PC RV object.

◆ ncat_

int Post::ncat_
protected

Number of categories.

◆ nData_

int Post::nData_
protected

Number of data points.

◆ nEachs_

Array1D<int> Post::nEachs_
protected

Number of samples at each input.

◆ pdfType_

string Post::pdfType_
protected

Input parameter PDF type.

◆ pDim_

int Post::pDim_
protected

Dimensionality of parameter space (p-space)

◆ priora_

double Post::priora_
protected

Prior parameter #1.

◆ priorb_

double Post::priorb_
protected

Prior parameter #2.

◆ priorType_

string Post::priorType_
protected

Prior type.

◆ rndInd_

Array1D<int> Post::rndInd_
protected

Indices of randomized inputs.

◆ rvpcType_

string Post::rvpcType_
protected

PC type parameter for the r.v.

◆ upper_

Array1D<double> Post::upper_
protected

◆ verbosity_

int Post::verbosity_
private

Verbosity level.

◆ xData_

Array2D<double> Post::xData_
protected

xdata

◆ xDim_

int Post::xDim_
protected

Dimensionality of x-space.

◆ yData_

Array1D<Array1D<double> > Post::yData_
protected

ydata

◆ yDatam_

Array1D<double> Post::yDatam_
protected

ydata averaged per measurement


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