48#include "sampling.hpp"
289 for (
int i=0; i<parameters.
XSize();i++){
292 std::cout<<
"Out of bounds: param("<<i+1<<
"<<) = "<<parameters(i)<<std::endl;
299 userRunModel(modelDataY, modelDataX, parameters, hyperparameters);
304 userRunModel(modelDataY, modelDataX, parameters, hyperparameters);
315 DFI(
string inputfile);
1D Array class for any type T
2D Array class for any type T
3D Array class for any type T
Header file for the Multivariate PC class.
Header file for array read/write utilities.
Stores data of any type T in a 1D array.
Definition Array1D.h:61
int XSize() const
Returns size in the x-direction.
Definition Array1D.h:103
Stores data of any type T in a 2D array.
Definition Array2D.h:60
DFI()
Definition dfi.cpp:33
ofstream logFile
Definition dfi.h:234
void buildKDE(Array1D< int > KDEdim)
Definition dfi.cpp:914
stringstream logFileName
Definition dfi.h:232
int dataChainNumSamples
Definition dfi.h:244
double dataChainPropCov_fac
Definition dfi.h:259
dataPosteriorInformation dataPostInfo
Definition dfi.h:226
void specifyNominalParams(dataPosteriorInformation &dataPostInfo)
Definition dfi.h:275
double targetDataChainAcceptanceRatio
Definition dfi.h:250
int seed
Definition dfi.h:222
Array1D< double > noisyData
Definition dfi.h:238
void genSamples(Array2D< double > &pdf)
Definition dfi.cpp:1092
void buildSurrogateModel()
Definition dfi.cpp:521
void testSurrogateModel()
Definition dfi.cpp:845
double dataChainAcceptanceRatio
Definition dfi.h:252
parameterPosteriorInformation paramPostInfo
Definition dfi.h:228
void loadSurrogateModel()
Definition dfi.cpp:698
void dataInference()
Definition dfi.cpp:208
void dataRefit()
Definition dfi.cpp:401
~DFI()
Definition dfi.cpp:200
double errorOptChainNumSamples
Definition dfi.h:248
Array2D< double > dataChainPropCovMatrix
Definition dfi.h:263
double dataScale
Definition dfi.h:240
void defineConstraints(dataPosteriorInformation &dataPostInfo)
Definition dfi.h:271
void runModel(Array1D< double > &modelDataY, Array1D< double > &modelDataX, Array1D< double > ¶meters, Array1D< double > &hyperparameters)
Definition dfi.h:279
double dataPosteriorMode
Definition dfi.h:254
int dataChainNumSamples_burnin
Definition dfi.h:246
double dataChainPropCov_init
Definition dfi.h:257
void defineData(dataPosteriorInformation &dataPostInfo)
Definition dfi.h:267
Array2D< double > PCEcoefficients
Definition dfi.h:85
Array1D< double > surrLo
Definition dfi.h:73
PCSet * surrModel
Definition dfi.h:80
int numPCETerms
Definition dfi.h:83
void evaluateSurr(Array1D< double > &modelOutput, Array1D< double > ¶ms)
Definition dfi.cpp:1106
bool surrDefined
Definition dfi.h:77
Array2D< double > psiPCE
Definition dfi.h:87
Array1D< double > surrHi
Definition dfi.h:74
int PCEdim
Definition dfi.h:70
Defines and initializes PC basis function set and provides functions to manipulate PC expansions defi...
Definition PCSet.h:73
vector< double > statValues
Definition dfi.h:139
bool errorOpt
Definition dfi.h:111
Array1D< double > trueDatax
Definition dfi.h:122
bool dataChainBurnedIn
Definition dfi.h:113
string burninParamWriteFile
Definition dfi.h:147
int seed
Definition dfi.h:101
int numConstraints
Definition dfi.h:107
int numSurr
Definition dfi.h:158
Array1D< double > hyperparameters
Definition dfi.h:131
int parameterBurnInNumSamples
Definition dfi.h:152
Array1D< double > error
Definition dfi.h:125
DFIsurr surrModelObj
Definition dfi.h:157
Array1D< double > nominalParameters
Definition dfi.h:127
Array1D< double > optErrorParameters
Definition dfi.h:119
vector< string > statLabels
Definition dfi.h:137
int dataDim
Definition dfi.h:103
vector< DFIsurr > surrModels
Definition dfi.h:159
Array1D< double > surrParameters
Definition dfi.h:133
int parameterChainNumSamples
Definition dfi.h:153
vector< double > statDeltas
Definition dfi.h:141
Array1D< double > trueDatay
Definition dfi.h:123
int paramWriteFlag
Definition dfi.h:145
int dataChain_count
Definition dfi.h:115
string mainParamWriteFile
Definition dfi.h:149
Array1D< double > nominalErrorParameters
Definition dfi.h:129
int paramDim
Definition dfi.h:105
bool errorOpt
Definition dfi.h:171
vector< DFIsurr > * surrModels_
Definition dfi.h:178
Array1D< double > dataChainState
Definition dfi.h:167
Array1D< double > hyperparameters
Definition dfi.h:170
Array1D< double > trueDatax
Definition dfi.h:173
Array1D< double > optErrorParams
Definition dfi.h:169
DFIsurr * surrModelObj_
Definition dfi.h:176
double beta(const double z, const double w)
Compute the Beta function at the point pair (z,w)
Definition combin.cpp:218
void computeStatistics(Array1D< double > ¶meterStatistics, Array1D< MCMC::chainstate > ¶meterChain)
Definition dfi.cpp:1410
double dataInferenceLogPosterior(Array1D< double > &m, void *info)
Definition dfi.cpp:1149
void userComputeStatistics(Array1D< double > ¶meterStatistics, Array1D< MCMC::chainstate > ¶meterChain)
double parameterInferenceLogPosterior(Array1D< double > &beta, void *info)
Definition dfi.cpp:1387
double computeParamLogPosterior(parameterPosteriorInformation *paramPostInfo, Array1D< double > parameters)
Definition dfi.cpp:1402
void userDefineConstraints(dataPosteriorInformation &dataPostInfo)
double userComputeParamLogPosterior(parameterPosteriorInformation *paramPostInfo, Array1D< double > parameters)
void userDefineData(dataPosteriorInformation &dataPostInfo)
double computeParamLogLikelihood(parameterPosteriorInformation *paramPostInfo, Array1D< double > modelDataOut, Array1D< double > parameters, Array1D< double > hyperparameters)
Definition dfi.cpp:1406
void parameterInference(dataPosteriorInformation *dataPostInfo, Array1D< double > &m, Array1D< MCMC::chainstate > ¶meterChainEntries)
Definition dfi.cpp:1232
double userComputeParamLogLikelihood(parameterPosteriorInformation *paramPostInfo, Array1D< double > modelDataOut, Array1D< double > parameters, Array1D< double > hyperparameters)
void userRunModel(Array1D< double > &modelDataY, Array1D< double > &modelDataX, Array1D< double > ¶meters, Array1D< double > &hyperparameters)
void userSpecifyNominalParams(dataPosteriorInformation &dataPostInfo)
Header file for the Markov chain Monte Carlo class.
Header file for the quadrature class.