BCModel Class Reference

#include <BCModel.h>

Inheritance diagram for BCModel:

Inheritance graph
[legend]
Collaboration diagram for BCModel:

Collaboration graph
[legend]

List of all members.


Detailed Description

The base class for all user-defined models.

Author:
Daniel Kollar

Kevin Kröninger

Version:
1.0
Date:
08.2008 This class represents a model. It contains a container of parameters, their prior distributions and the conditional probabilities given those parameters. The methods which implement the prior and conditional probabilities have to be overloaded by the user in the user defined model class which will inherit from this class.

Definition at line 47 of file BCModel.h.


Public Member Functions

Member functions (miscellaneous methods)


int AddParameter (BCParameter *parameter)
int AddParameter (const char *name, double lowerlimit, double upperlimit)
double APrioriProbability (std::vector< double > parameters)
void CalculateErrorBandXY (int nx, double xmin, double xmax, int ny, double ymin, double ymax, int niter)
BCH1DCalculatePValue (std::vector< double > par, bool flag_histogram=false)
int CheckParameters (std::vector< double > parameters)
double ConditionalProbabilityEntry (BCDataPoint *datapoint, std::vector< double > parameters)
virtual void CorrelateDataPointValues (std::vector< double > &x)
void CreateData (int ndatasets, std::vector< double > parameters)
void CreateDataGrid (int ndatasets, std::vector< double > parameters, std::vector< bool > grid, std::vector< double > limits)
void CreateDataGridROOT (int ndatasets, std::vector< double > parameters, std::vector< bool > grid, std::vector< double > limits)
virtual void DefineParameters ()
BCH1DDoGoodnessOfFitTest (const char *filename, std::vector< double > parameters)
BCH1DDoGoodnessOfFitTest (const char *filename)
BCH1DDoGoodnessOfFitTest (int ndatasets)
BCH1DDoGoodnessOfFitTest (int ndatasets, std::vector< double > parameters)
BCH1DDoGoodnessOfFitTest (int ndatasets, std::vector< double > parameters, std::vector< bool > grid, std::vector< double > limits)
BCH1DDoGoodnessOfFitTestROOT (int ndatasets, std::vector< double > parameters, std::vector< bool > grid, std::vector< double > limits)
double Eval (std::vector< double > parameters)
double EvalSampling (std::vector< double > parameters)
void FindMode ()
void FixDataAxis (int index, bool fixed)
BCH2DGetMarginalized (const char *name1, const char *name2)
BCH2DGetMarginalized (BCParameter *parameter1, BCParameter *parameter2)
BCH1DGetMarginalized (const char *name)
BCH1DGetMarginalized (BCParameter *parameter)
double GetPValue ()
double GetPvalueFromChi2 (std::vector< double > par, int sigma_index)
BCH1DGoodnessOfFitTest (const char *filenname, std::vector< double > parameters)
BCH1DGoodnessOfFitTestROOT (int ndatasets, const char *filename, std::vector< double > parameters)
double HessianMatrixElement (BCParameter *parameter1, BCParameter *parameter2, std::vector< double > point)
double Likelihood (std::vector< double > parameter)
virtual double LogAPrioriProbability (std::vector< double > parameters)
virtual double LogConditionalProbabilityEntry (BCDataPoint *datapoint, std::vector< double > parameters)
double LogEval (std::vector< double > parameters)
virtual double LogLikelihood (std::vector< double > parameter)
virtual double LogPoissonProbability (int nentries, std::vector< double > parameters)
double LogProbability (std::vector< double > parameter)
double LogProbabilityNN (std::vector< double > parameter)
int MarginalizeAll ()
BCH2DMarginalizeProbability (const char *name1, const char *name2)
BCH2DMarginalizeProbability (BCParameter *parameter1, BCParameter *parameter2)
BCH1DMarginalizeProbability (const char *name)
BCH1DMarginalizeProbability (BCParameter *parameter)
double Normalize ()
double PoissonProbability (int nentries, std::vector< double > parameters)
int PrintAllMarginalized (const char *file, int hdiv=1, int ndiv=1)
int PrintAllMarginalized1D (const char *filebase)
int PrintAllMarginalized2D (const char *filebase)
void PrintHessianMatrix (std::vector< double > parameters)
void PrintResults (const char *file)
void PrintSummary ()
double Probability (std::vector< double > parameter)
double ProbabilityNN (std::vector< double > parameter)
int ReadErrorBandFromFile (const char *file)
int ReadMarginalizedFromFile (const char *file)
int ReadMode (const char *file)
virtual double SamplingFunction (std::vector< double > parameters)
void WriteMode (const char *file)
Constructors and destructors


 BCModel (const char *name)
 BCModel ()
virtual ~BCModel ()
Member functions (get)


double GetBestFitParameter (int index)
double GetBestFitParameterMarginalized (int index)
std::vector< double > GetBestFitParameters ()
std::vector< double > GetBestFitParametersMarginalized ()
BCDataPointGetDataPoint (int index)
BCDataPointGetDataPointLowerBoundaries ()
double GetDataPointLowerBoundary (int index)
BCDataPointGetDataPointUpperBoundaries ()
double GetDataPointUpperBoundary (int index)
BCDataSetGetDataSet ()
std::vector< double > GetErrorBand (double level)
TGraph * GetErrorBandGraph (double level1, double level2)
TH2D * GetErrorBandXY ()
TGraph * GetFitFunctionGraph (std::vector< double > parameters, double xmin, double xmax, int n=1000)
TGraph * GetFitFunctionGraph ()
TGraph * GetFitFunctionGraph (std::vector< double > parameters)
bool GetFixedDataAxis (int index)
bool GetFlagBoundaries ()
int GetIndex ()
double GetModelAPosterioriProbability ()
double GetModelAPrioriProbability ()
std::string GetName ()
int GetNDataPoints ()
int GetNDataPointsMaximum ()
int GetNDataPointsMinimum ()
double GetNormalization ()
int GetNParameters ()
BCParameterGetParameter (const char *name)
BCParameterGetParameter (int index)
Member functions (set)


void SetDataBoundaries (int index, double lowerboundary, double upperboundary, bool fixed=false)
void SetDataSet (BCDataSet *dataset)
void SetErrorBandContinuous (bool flag)
void SetIndex (int index)
void SetModelAPosterioriProbability (double probability)
void SetModelAPrioriProbability (double probability)
void SetName (const char *name)
void SetNDataPointsMaximum (int maximum)
void SetNDataPointsMinimum (int minimum)
void SetNormalization (double norm)
void SetSingleDataPoint (BCDataSet *dataset, int index)
void SetSingleDataPoint (BCDataPoint *datapoint)

Protected Attributes

BCDataSetfDataSet
int fIndex
bool flag_ConditionalProbabilityEntry
double fModelAPosteriori
double fModelAPriori
std::string fName
int fNDataPointsMaximum
int fNDataPointsMinimum
BCParameterSetfParameterSet
double fPValue

Private Member Functions

int CompareStrings (const char *string1, const char *string2)
BCDataPointVectorToDataPoint (std::vector< double > data)

Private Attributes

double fNormalization

Constructor & Destructor Documentation

BCModel::BCModel (  ) 

The default constructor.

Definition at line 51 of file BCModel.cxx.

BCModel::BCModel ( const char *  name  ) 

A constructor.

Parameters:
name The name of the model

Definition at line 26 of file BCModel.cxx.

BCModel::~BCModel (  )  [virtual]

The default destructor.

Definition at line 74 of file BCModel.cxx.


Member Function Documentation

int BCModel::AddParameter ( BCParameter parameter  ) 

Adds a parameter to the model.

Parameters:
parameter A model parameter
See also:
AddParameter(const char * name, double lowerlimit, double upperlimit);

Definition at line 433 of file BCModel.cxx.

int BCModel::AddParameter ( const char *  name,
double  lowerlimit,
double  upperlimit 
)

Adds a parameter to the parameter set

Parameters:
name The name of the parameter
lowerlimit The lower limit of the parameter values
upperlimit The upper limit of the parameter values
See also:
AddParameter(BCParameter* parameter);

Definition at line 413 of file BCModel.cxx.

double BCModel::APrioriProbability ( std::vector< double >  parameters  )  [inline]

Returns the prior probability.

Parameters:
parameters A set of parameter values
Returns:
The prior probability p(parameters)
See also:
GetPrior(std::vector <double> parameters)

Definition at line 354 of file BCModel.h.

void BCModel::CalculateErrorBandXY ( int  nx,
double  xmin,
double  xmax,
int  ny,
double  ymin,
double  ymax,
int  niter 
)

Returns upper and lower value for a given point x on the error band param x A vector of x-values param ymin The minimum value param ymax The maximum value

Definition at line 566 of file BCModel.cxx.

BCH1D * BCModel::CalculatePValue ( std::vector< double >  par,
bool  flag_histogram = false 
)

Definition at line 2276 of file BCModel.cxx.

int BCModel::CheckParameters ( std::vector< double >  parameters  ) 

Checks if a set of parameters values is within the given range.

Parameters:
parameters A set of parameter values
Returns:
Error code (0: OK, -1 length of parameters not correct, -2 values not within range)

Definition at line 682 of file BCModel.cxx.

int BCModel::CompareStrings ( const char *  string1,
const char *  string2 
) [private]

Compares to strings

Definition at line 2684 of file BCModel.cxx.

double BCModel::ConditionalProbabilityEntry ( BCDataPoint datapoint,
std::vector< double >  parameters 
) [inline]

Returns a conditional probability. Method needs to be overloaded by the user.

Parameters:
datapoint A data point
parameters A set of parameter values
Returns:
The conditional probability p(datapoint|parameters)
See also:
GetConditionalEntry(BCDataPoint* datapoint, std::vector <double> parameters)

Definition at line 422 of file BCModel.h.

void BCModel::CorrelateDataPointValues ( std::vector< double > &  x  )  [virtual]

Constrains a data point

Parameters:
x A vector of double

Definition at line 2315 of file BCModel.cxx.

void BCModel::CreateData ( int  ndatasets,
std::vector< double >  parameters 
)

Creates data sets given a set of parameters.

Parameters:
ndatasets The number of data sets to be created
parameters A set of parameter values

Definition at line 1290 of file BCModel.cxx.

void BCModel::CreateDataGrid ( int  ndatasets,
std::vector< double >  parameters,
std::vector< bool >  grid,
std::vector< double >  limits 
)

Creates data sets in a grid given a set of parameters.

Parameters:
ndatasets The number of data sets to be created
parameters A set of parameter values
grid Boolean for random (false) or grid values (true)
limits Limits for each data value

Definition at line 1309 of file BCModel.cxx.

void BCModel::CreateDataGridROOT ( int  ndatasets,
std::vector< double >  parameters,
std::vector< bool >  grid,
std::vector< double >  limits 
)

Creates data sets in a grid given a set of parameters.

Parameters:
ndatasets The number of data sets to be created
parameters A set of parameter values
grid Boolean for random (false) or grid values (true)
limits Limits for each data value

Definition at line 1581 of file BCModel.cxx.

virtual void BCModel::DefineParameters (  )  [inline, virtual]

Defines the parameters of the model Method needs to be overloaded by the user.

Definition at line 345 of file BCModel.h.

BCH1D * BCModel::DoGoodnessOfFitTest ( const char *  filename,
std::vector< double >  parameters 
)

Definition at line 2234 of file BCModel.cxx.

BCH1D * BCModel::DoGoodnessOfFitTest ( const char *  filename  ) 

Definition at line 2251 of file BCModel.cxx.

BCH1D * BCModel::DoGoodnessOfFitTest ( int  ndatasets  ) 

Definition at line 2214 of file BCModel.cxx.

BCH1D * BCModel::DoGoodnessOfFitTest ( int  ndatasets,
std::vector< double >  parameters 
)

Definition at line 2185 of file BCModel.cxx.

BCH1D * BCModel::DoGoodnessOfFitTest ( int  ndatasets,
std::vector< double >  parameters,
std::vector< bool >  grid,
std::vector< double >  limits 
)

Do goodness-of-fit test. Creates data sets and performs a goodness-of-fit test.

Parameters:
ndatasets The number of data sets to be created
parameters A set of parameter values
grid Boolean for random (false) or grid values (true)
limits Limits for each data value
See also:
CreateData(int ndatasets, std::vector <double> parameters)

CreateDataGrid(int ndatasets, std::vector <double> parameters, std::vector <bool> grid, std::vector <double> limits)

GoodnessOfFitTest(const char * filenname, std::vector <double> parameters)

Definition at line 2127 of file BCModel.cxx.

BCH1D * BCModel::DoGoodnessOfFitTestROOT ( int  ndatasets,
std::vector< double >  parameters,
std::vector< bool >  grid,
std::vector< double >  limits 
)

Definition at line 2156 of file BCModel.cxx.

double BCModel::Eval ( std::vector< double >  parameters  )  [inline, virtual]

Overloaded function to evaluate integral.

Reimplemented from BCIntegrate.

Definition at line 474 of file BCModel.h.

double BCModel::EvalSampling ( std::vector< double >  parameters  )  [virtual]

Overloaded function to evaluate integral.

Reimplemented from BCIntegrate.

Definition at line 557 of file BCModel.cxx.

void BCModel::FindMode (  ) 

Does the mode finding

Definition at line 713 of file BCModel.cxx.

void BCModel::FixDataAxis ( int  index,
bool  fixed 
)

Definition at line 2381 of file BCModel.cxx.

double BCModel::GetBestFitParameter ( int  index  )  [inline]

Returns the value of a particular parameter (defined by index) at the global mode of the posterior pdf.

Parameters:
index The index of the parameter.
Returns:
The best fit parameter.

Definition at line 191 of file BCModel.h.

double BCModel::GetBestFitParameterMarginalized ( int  index  )  [inline]

Returns the value of a particular parameter (defined by index) at the modes of the marginalized posterior pdfs.

Parameters:
index The index of the parameter.
Returns:
The best fit parameter

Definition at line 208 of file BCModel.h.

std::vector<double> BCModel::GetBestFitParameters (  )  [inline]

Returns the set of values of the parameters at the global mode of the posterior pdf.

Returns:
The best fit parameters

Definition at line 199 of file BCModel.h.

std::vector<double> BCModel::GetBestFitParametersMarginalized (  )  [inline]

Returns the set of values of the parameters at the modes of the marginalized posterior pdfs.

Returns:
The best fit parameters.

Definition at line 216 of file BCModel.h.

BCDataPoint * BCModel::GetDataPoint ( int  index  ) 

Parameters:
index The index of the data point.
Returns:
The data point in the current data set at index

Definition at line 111 of file BCModel.cxx.

BCDataPoint* BCModel::GetDataPointLowerBoundaries (  )  [inline]

Returns:
The lower boundaries of possible data values.

Definition at line 115 of file BCModel.h.

double BCModel::GetDataPointLowerBoundary ( int  index  )  [inline]

Parameters:
index The index of the variable.
Returns:
The lower boundary of possible data values for a particular variable.

Definition at line 128 of file BCModel.h.

BCDataPoint* BCModel::GetDataPointUpperBoundaries (  )  [inline]

Returns:
The upper boundaries of possible data values.

Definition at line 121 of file BCModel.h.

double BCModel::GetDataPointUpperBoundary ( int  index  )  [inline]

Parameters:
index The index of the variable.
Returns:
The upper boundary of possible data values for a particular variable.

Definition at line 135 of file BCModel.h.

BCDataSet* BCModel::GetDataSet (  )  [inline]

Returns:
The data set.

Definition at line 109 of file BCModel.h.

std::vector< double > BCModel::GetErrorBand ( double  level  ) 

Returns a vector of y-values at a certain probability level.

Parameters:
level The level of probability
Returns:
The vector of y-values

Definition at line 166 of file BCModel.cxx.

TGraph * BCModel::GetErrorBandGraph ( double  level1,
double  level2 
)

Definition at line 202 of file BCModel.cxx.

TH2D* BCModel::GetErrorBandXY (  )  [inline]

Returns:
The 2-d histogram of the error band.

Definition at line 222 of file BCModel.h.

TGraph * BCModel::GetFitFunctionGraph ( std::vector< double >  parameters,
double  xmin,
double  xmax,
int  n = 1000 
)

Definition at line 265 of file BCModel.cxx.

TGraph* BCModel::GetFitFunctionGraph (  )  [inline]

Definition at line 236 of file BCModel.h.

TGraph * BCModel::GetFitFunctionGraph ( std::vector< double >  parameters  ) 

Definition at line 231 of file BCModel.cxx.

bool BCModel::GetFixedDataAxis ( int  index  ) 

Definition at line 2403 of file BCModel.cxx.

bool BCModel::GetFlagBoundaries (  ) 

Definition at line 294 of file BCModel.cxx.

int BCModel::GetIndex (  )  [inline]

Returns:
The index of the model.

Definition at line 85 of file BCModel.h.

BCH2D* BCModel::GetMarginalized ( const char *  name1,
const char *  name2 
) [inline]

Definition at line 574 of file BCModel.h.

BCH2D * BCModel::GetMarginalized ( BCParameter parameter1,
BCParameter parameter2 
)

If MarginalizeAll method was used, the individual marginalized distributions with respect to otwo parameters can be retrieved using this method.

Parameters:
parameter1 First parameter
parameter2 Second parameter
Returns:
2D marginalized probability

Definition at line 1239 of file BCModel.cxx.

BCH1D* BCModel::GetMarginalized ( const char *  name  )  [inline]

Definition at line 562 of file BCModel.h.

BCH1D * BCModel::GetMarginalized ( BCParameter parameter  ) 

If MarginalizeAll method was used, the individual marginalized distributions with respect to one parameter can be retrieved using this method.

Parameters:
parameter Model parameter
Returns:
1D marginalized probability

Definition at line 955 of file BCModel.cxx.

double BCModel::GetModelAPosterioriProbability (  )  [inline]

Returns:
The a posteriori probability.

Definition at line 97 of file BCModel.h.

double BCModel::GetModelAPrioriProbability (  )  [inline]

Returns:
The a priori probability.

Definition at line 91 of file BCModel.h.

std::string BCModel::GetName (  )  [inline]

Returns:
The name of the model.

Definition at line 79 of file BCModel.h.

int BCModel::GetNDataPoints (  ) 

Returns:
The number of data points in the current data set.

Definition at line 92 of file BCModel.cxx.

int BCModel::GetNDataPointsMaximum (  )  [inline]

Returns:
The maximum number of data points.

Definition at line 164 of file BCModel.h.

int BCModel::GetNDataPointsMinimum (  )  [inline]

Returns:
The minimum number of data points.

Definition at line 158 of file BCModel.h.

double BCModel::GetNormalization (  )  [inline]

Returns:
The normalization of the likelihood.

Definition at line 103 of file BCModel.h.

int BCModel::GetNParameters (  )  [inline]

Returns:
The number of parameters of the model.

Definition at line 170 of file BCModel.h.

BCParameter * BCModel::GetParameter ( const char *  name  ) 

Parameters:
name The name of the parameter in the parameter set.
Returns:
The parameter.

Definition at line 141 of file BCModel.cxx.

BCParameter * BCModel::GetParameter ( int  index  ) 

Parameters:
index The index of the parameter in the parameter set.
Returns:
The parameter.

Definition at line 124 of file BCModel.cxx.

double BCModel::GetPValue (  )  [inline]

Definition at line 659 of file BCModel.h.

double BCModel::GetPvalueFromChi2 ( std::vector< double >  par,
int  sigma_index 
)

Calculate p-value from Chi2 distribution for Gaussian problems

Parameters:
par Parameter set for the calculation of the likelihood
sigma_index Index of the sigma/uncertainty for the data points (for data in format "x y erry" the index would be 2)

Definition at line 2260 of file BCModel.cxx.

BCH1D * BCModel::GoodnessOfFitTest ( const char *  filenname,
std::vector< double >  parameters 
)

Goodness-of-fit test. Assuming a certain set of parameters this function reads data from a file (which was created under the assumption of the model and the same set of parameters) and calculates the frequency distribution of the probability p(data|parameters).

Parameters:
filename A file which contains a list of files with ensembles
parameters The parameter values for which the probability is calculated
Returns:
A frequency distribution of the conditional probability for the data sets given the parameters

Definition at line 1829 of file BCModel.cxx.

BCH1D * BCModel::GoodnessOfFitTestROOT ( int  ndatasets,
const char *  filename,
std::vector< double >  parameters 
)

Definition at line 1978 of file BCModel.cxx.

double BCModel::HessianMatrixElement ( BCParameter parameter1,
BCParameter parameter2,
std::vector< double >  point 
)

Calculates the matrix element of the Hessian matrix

Parameters:
parameter1 The parameter for the first derivative
parameter2 The parameter for the first derivative
Returns:
The matrix element of the Hessian matrix

Definition at line 2322 of file BCModel.cxx.

double BCModel::Likelihood ( std::vector< double >  parameter  )  [inline]

Returns the likelihood

Parameters:
parameters A set of parameter values
Returns:
The likelihood

Definition at line 372 of file BCModel.h.

virtual double BCModel::LogAPrioriProbability ( std::vector< double >  parameters  )  [inline, virtual]

Returns natural logarithm of the prior probability. Method needs to be overloaded by the user.

Parameters:
parameters A set of parameter values
Returns:
The prior probability p(parameters)
See also:
GetPrior(std::vector <double> parameters)

Reimplemented in BCModelTest.

Definition at line 364 of file BCModel.h.

virtual double BCModel::LogConditionalProbabilityEntry ( BCDataPoint datapoint,
std::vector< double >  parameters 
) [inline, virtual]

Returns a natural logarithm of conditional probability. Method needs to be overloaded by the user.

Parameters:
datapoint A data point
parameters A set of parameter values
Returns:
The conditional probability p(datapoint|parameters)
See also:
GetConditionalEntry(BCDataPoint* datapoint, std::vector <double> parameters)

Definition at line 433 of file BCModel.h.

double BCModel::LogEval ( std::vector< double >  parameters  )  [virtual]

Overloaded function to evaluate integral.

Reimplemented from BCIntegrate.

Definition at line 548 of file BCModel.cxx.

double BCModel::LogLikelihood ( std::vector< double >  parameter  )  [virtual]

Calculates natural logarithm of the likelihood. Method needs to be overloaded by the user.

Parameters:
parameters A set of parameter values
Returns:
Natural logarithm of the likelihood

Reimplemented in BCModelTest.

Definition at line 525 of file BCModel.cxx.

virtual double BCModel::LogPoissonProbability ( int  nentries,
std::vector< double >  parameters 
) [inline, virtual]

Returns a probability for the data set container. Method to be overloaded by the user.

Parameters:
parameters A set of parameter values
Returns:
The probability for the data set container
See also:
GetPoisson(std::vector <double> parameters)

Definition at line 452 of file BCModel.h.

double BCModel::LogProbability ( std::vector< double >  parameter  ) 

Returns natural logarithm of the a posteriori probability given a set of parameter values

Parameters:
parameters A set of parameter values
Returns:
The a posteriori probability

Definition at line 507 of file BCModel.cxx.

double BCModel::LogProbabilityNN ( std::vector< double >  parameter  ) 

Returns the natural logarithm of likelihood times prior probability given a set of parameter values

Parameters:
parameters A set of parameter values
Returns:
The likelihood times prior probability

Definition at line 490 of file BCModel.cxx.

int BCModel::MarginalizeAll (  ) 

Marginalize all probabilities wrt. single parameters and all combinations of two parameters. The individual distributions can be retrieved using the GetMarginalized method.

Returns:
Total number of marginalized distributions

Definition at line 908 of file BCModel.cxx.

BCH2D* BCModel::MarginalizeProbability ( const char *  name1,
const char *  name2 
) [inline]

Definition at line 543 of file BCModel.h.

BCH2D * BCModel::MarginalizeProbability ( BCParameter parameter1,
BCParameter parameter2 
)

Marginalizes the a posteriori probability with respect to two parameters.

Parameters:
parameter1 First parameter
parameter2 Second parameter
Returns:
2D marginalized probability

Definition at line 880 of file BCModel.cxx.

BCH1D* BCModel::MarginalizeProbability ( const char *  name  )  [inline]

Definition at line 532 of file BCModel.h.

BCH1D * BCModel::MarginalizeProbability ( BCParameter parameter  ) 

Marginalizes the a posteriori probability with respect to a parameter.

Parameters:
parameter A model parameter
Returns:
1D marginalized probability

Definition at line 839 of file BCModel.cxx.

double BCModel::Normalize (  ) 

Integrates over the un-normalized probability and updates fNormalization.

Definition at line 655 of file BCModel.cxx.

double BCModel::PoissonProbability ( int  nentries,
std::vector< double >  parameters 
) [inline]

Returns a probability for the data set container.

Parameters:
parameters A set of parameter values
Returns:
The probability for the data set container
See also:
GetPoisson(std::vector <double> parameters)

Definition at line 442 of file BCModel.h.

int BCModel::PrintAllMarginalized ( const char *  file,
int  hdiv = 1,
int  ndiv = 1 
)

Definition at line 1136 of file BCModel.cxx.

int BCModel::PrintAllMarginalized1D ( const char *  filebase  ) 

Definition at line 1088 of file BCModel.cxx.

int BCModel::PrintAllMarginalized2D ( const char *  filebase  ) 

Definition at line 1109 of file BCModel.cxx.

void BCModel::PrintHessianMatrix ( std::vector< double >  parameters  ) 

Prints matrix elements of the Hessian matrix

Parameters:
parameters The parameter values at which point to evaluate the matrix

Definition at line 2633 of file BCModel.cxx.

void BCModel::PrintResults ( const char *  file  ) 

Prints a summary of the Markov Chain Monte Carlo to a file.

Definition at line 2488 of file BCModel.cxx.

void BCModel::PrintSummary (  ) 

Prints a summary on the screen.

Definition at line 2422 of file BCModel.cxx.

double BCModel::Probability ( std::vector< double >  parameter  )  [inline]

Returns the a posteriori probability given a set of parameter values

Parameters:
parameters A set of parameter values
Returns:
The a posteriori probability

Definition at line 404 of file BCModel.h.

double BCModel::ProbabilityNN ( std::vector< double >  parameter  )  [inline]

Returns the likelihood times prior probability given a set of parameter values

Parameters:
parameters A set of parameter values
Returns:
The likelihood times prior probability

Definition at line 388 of file BCModel.h.

int BCModel::ReadErrorBandFromFile ( const char *  file  ) 

Read

Definition at line 1058 of file BCModel.cxx.

int BCModel::ReadMarginalizedFromFile ( const char *  file  ) 

Read

Definition at line 1003 of file BCModel.cxx.

int BCModel::ReadMode ( const char *  file  ) 

Read mode from file created by WriteMode() call

Definition at line 796 of file BCModel.cxx.

double BCModel::SamplingFunction ( std::vector< double >  parameters  )  [virtual]

Sampling function used for importance sampling. Method needs to be overloaded by the user.

Parameters:
parameters A set of parameter values
Returns:
The probability density at the parameter values

Definition at line 638 of file BCModel.cxx.

void BCModel::SetDataBoundaries ( int  index,
double  lowerboundary,
double  upperboundary,
bool  fixed = false 
)

Definition at line 346 of file BCModel.cxx.

void BCModel::SetDataSet ( BCDataSet dataset  )  [inline]

Sets the data set.

Parameters:
dataset A data set

Definition at line 290 of file BCModel.h.

void BCModel::SetErrorBandContinuous ( bool  flag  ) 

Sets the error band flag to continuous function

Definition at line 390 of file BCModel.cxx.

void BCModel::SetIndex ( int  index  )  [inline]

Sets the index of the model within the BCModelManager.

Parameters:
index The index of the model

Definition at line 259 of file BCModel.h.

void BCModel::SetModelAPosterioriProbability ( double  probability  )  [inline]

Sets the a posteriori probability for a model.

Parameters:
model The model
probability The a posteriori probability

Definition at line 275 of file BCModel.h.

void BCModel::SetModelAPrioriProbability ( double  probability  )  [inline]

Sets the a priori probability for a model.

Parameters:
model The model
probability The a priori probability

Definition at line 267 of file BCModel.h.

void BCModel::SetName ( const char *  name  )  [inline]

Sets the name of the model.

Parameters:
name Name of the model

Definition at line 252 of file BCModel.h.

void BCModel::SetNDataPointsMaximum ( int  maximum  )  [inline]

Sets the maximum number of data points.

Definition at line 310 of file BCModel.h.

void BCModel::SetNDataPointsMinimum ( int  minimum  )  [inline]

Sets the minimum number of data points.

Definition at line 304 of file BCModel.h.

void BCModel::SetNormalization ( double  norm  )  [inline]

Sets the normalization of the likelihood. The normalization is the integral of likelihood over all parameters.

Parameters:
norm The normalization of the likelihood

Definition at line 283 of file BCModel.h.

void BCModel::SetSingleDataPoint ( BCDataSet dataset,
int  index 
)

Definition at line 334 of file BCModel.cxx.

void BCModel::SetSingleDataPoint ( BCDataPoint datapoint  ) 

Sets a single data point as data set.

Parameters:
datapoint A data point

Definition at line 315 of file BCModel.cxx.

BCDataPoint * BCModel::VectorToDataPoint ( std::vector< double >  data  )  [private]

Converts a vector of doubles into a BCDataPoint

Definition at line 2669 of file BCModel.cxx.

void BCModel::WriteMode ( const char *  file  ) 

Write mode into file

Definition at line 755 of file BCModel.cxx.


Member Data Documentation

A data set

Definition at line 720 of file BCModel.h.

int BCModel::fIndex [protected]

Index of the model.

Definition at line 695 of file BCModel.h.

Definition at line 735 of file BCModel.h.

double BCModel::fModelAPosteriori [protected]

The model a posteriori probability.

Definition at line 710 of file BCModel.h.

double BCModel::fModelAPriori [protected]

The model prior probability.

Definition at line 705 of file BCModel.h.

std::string BCModel::fName [protected]

Name of the model.

Definition at line 700 of file BCModel.h.

Maximum number of data points

Definition at line 730 of file BCModel.h.

Minimum number of data points

Definition at line 725 of file BCModel.h.

double BCModel::fNormalization [private]

The Likelihood normalization.

Definition at line 757 of file BCModel.h.

A model parameter container.

Definition at line 715 of file BCModel.h.

double BCModel::fPValue [protected]

The p-value

Definition at line 740 of file BCModel.h.


Generated on Mon Sep 15 17:04:29 2008 for Bayesian Analysis Toolkit by  doxygen 1.5.6