queso-0.56.1
|
#include <GPMSA.h>
Public Member Functions | |
GPMSAFactory (const BaseEnvironment &env, GPMSAOptions *opts, const BaseVectorRV< V, M > ¶meterPrior, const VectorSpace< V, M > &scenarioSpace, const VectorSpace< V, M > ¶meterSpace, const VectorSpace< V, M > &simulationOutputSpace, const VectorSpace< V, M > &experimentOutputSpace, unsigned int numSimulations, unsigned int numExperiments) | |
Constructor. More... | |
~GPMSAFactory () | |
Destructor. More... | |
void | addSimulation (V &simulationScenario, V &simulationParameter, V &simulationOutput) |
Add a simulation to this . More... | |
void | addSimulations (const std::vector< V * > &simulationScenarios, const std::vector< V * > &simulationParameters, const std::vector< V * > &simulationOutputs) |
Adds multiple simulations to this . More... | |
void | addExperiments (const std::vector< V * > &experimentScenarios, const std::vector< V * > &experimentOutputs, const M *experimentErrors) |
Add all experiments to this . More... | |
void | setDiscrepancyBases (const std::vector< V * > &discrepancyBases) |
Add all discrepancy bases to this . More... | |
M & | getObservationErrorCovariance (unsigned int simulationNumber) |
const M & | getObservationErrorCovariance (unsigned int simulationNumber) const |
const ConcatenatedVectorRV< V, M > & | prior () const |
void | print (std::ostream &os) const |
void | setUpEmulator () |
void | setUpHyperpriors () |
Getters | |
unsigned int | numSimulations () const |
Return number of simulations. More... | |
unsigned int | numExperiments () const |
Return number of experiments. More... | |
const VectorSpace< V, M > & | scenarioSpace () const |
Return the vector space in which scenarios live. More... | |
const VectorSpace< V, M > & | parameterSpace () const |
Return the vector space in which parameters live. More... | |
const VectorSpace< V, M > & | simulationOutputSpace () const |
Return the vector space in which simulations live. More... | |
const VectorSpace< V, M > & | experimentOutputSpace () const |
Return the vector space in which experiments live. More... | |
const V & | simulationScenario (unsigned int simulationId) const |
Return the point in scenarioSpace for simulation simulationId . More... | |
const std::vector< V * > & | simulationScenarios () const |
Return all points in scenarioSpace for all simulations. More... | |
const V & | simulationParameter (unsigned int simulationId) const |
Return the point in parameterSpace for simulation simulationId . More... | |
const std::vector< V * > & | simulationParameters () const |
Return all points in parameterSpace for all simulations. More... | |
const V & | simulationOutput (unsigned int simulationId) const |
Return the simulation output for simulation simulationId . More... | |
const std::vector< V * > & | simulationOutputs () const |
Return all points in simulationOutputSpace for all simulations. More... | |
const V & | experimentScenario (unsigned int experimentId) const |
Return the point in scenarioSpace for experiment experimentId . More... | |
const std::vector< V * > & | experimentScenarios () const |
Return all points in scenarioSpace for all experiments. More... | |
const V & | experimentOutput (unsigned int experimentId) const |
Return the experiment output for experiment experimentId . More... | |
const std::vector< V * > & | experimentOutputs () const |
Return all points in experimentOutputSpace for all experiments. More... | |
const M & | experimentErrors () const |
Return all observation error covarince matrices for all experiments. More... | |
const BaseEnvironment & | env () const |
Return the QUESO environment. More... | |
const GPMSAEmulator< V, M > & | getGPMSAEmulator () const |
Return the GPMSAEmulator likelihood object. More... | |
Private Attributes | |
bool | allocated_m_opts |
GPMSAOptions * | m_opts |
Friends | |
std::ostream & | operator<< (std::ostream &os, const GPMSAFactory< V, M > &obj) |
QUESO::GPMSAFactory< V, M >::GPMSAFactory | ( | const BaseEnvironment & | env, |
GPMSAOptions * | opts, | ||
const BaseVectorRV< V, M > & | parameterPrior, | ||
const VectorSpace< V, M > & | scenarioSpace, | ||
const VectorSpace< V, M > & | parameterSpace, | ||
const VectorSpace< V, M > & | simulationOutputSpace, | ||
const VectorSpace< V, M > & | experimentOutputSpace, | ||
unsigned int | numSimulations, | ||
unsigned int | numExperiments | ||
) |
Constructor.
Definition at line 425 of file GPMSA.C.
References QUESO::GPMSAFactory< V, M >::allocated_m_opts, QUESO::VectorSpace< V, M >::dimGlobal(), QUESO::GPMSAFactory< V, M >::m_discrepancyBases, QUESO::GPMSAFactory< V, M >::m_env, QUESO::GPMSAFactory< V, M >::m_experimentOutputSpace, QUESO::GPMSAFactory< V, M >::m_observationErrorMatrices, QUESO::GPMSAFactory< V, M >::m_opts, QUESO::VectorSpace< V, M >::map(), QUESO::GPMSAFactory< V, M >::numExperiments(), QUESO::BaseEnvironment::optionsInputFileName(), queso_assert_equal_to, and queso_error_msg.
QUESO::GPMSAFactory< V, M >::~GPMSAFactory | ( | ) |
void QUESO::GPMSAFactory< V, M >::addExperiments | ( | const std::vector< V * > & | experimentScenarios, |
const std::vector< V * > & | experimentOutputs, | ||
const M * | experimentErrors | ||
) |
Add all experiments to this
.
This method takes a vector of all the experimental data and associated observation errors/correlations and stores them. This cannot be done piecemeal like the simulation data.
Each experiment ([i]) is assumed to correspond to the point expermientScenarios
[i] in scenario space. The observation error covariance matrix is assumed to be stored in experimentErrors
.
Definition at line 894 of file GPMSA.C.
References queso_require_less_equal_msg.
void QUESO::GPMSAFactory< V, M >::addSimulation | ( | V & | simulationScenario, |
V & | simulationParameter, | ||
V & | simulationOutput | ||
) |
Add a simulation to this
.
The simulation added to this
is assumed to correspond to the point simulationScenario
in scenario space and simulationParameter
in parameter space. The simulation output is assumed to be stored in simulationOutput
.
Definition at line 664 of file GPMSA.C.
References queso_require_less_msg.
void QUESO::GPMSAFactory< V, M >::addSimulations | ( | const std::vector< V * > & | simulationScenarios, |
const std::vector< V * > & | simulationParameters, | ||
const std::vector< V * > & | simulationOutputs | ||
) |
Adds multiple simulations to this
.
This method takes a vector of simulations and calls addSimulation
on each element
Definition at line 684 of file GPMSA.C.
const BaseEnvironment & QUESO::GPMSAFactory< V, M >::env | ( | ) | const |
const M & QUESO::GPMSAFactory< V, M >::experimentErrors | ( | ) | const |
const V & QUESO::GPMSAFactory< V, M >::experimentOutput | ( | unsigned int | experimentId | ) | const |
Return the experiment output for experiment experimentId
.
The returned vector is a point in experimentOutputSpace
Definition at line 624 of file GPMSA.C.
References queso_require_less_msg, and queso_require_msg.
const std::vector< V * > & QUESO::GPMSAFactory< V, M >::experimentOutputs | ( | ) | const |
Return all points in experimentOutputSpace
for all experiments.
This returns all points in experiment output space at which experiments were executed
Definition at line 636 of file GPMSA.C.
const VectorSpace< V, M > & QUESO::GPMSAFactory< V, M >::experimentOutputSpace | ( | ) | const |
Return the vector space in which experiments live.
Definition at line 541 of file GPMSA.C.
const V & QUESO::GPMSAFactory< V, M >::experimentScenario | ( | unsigned int | experimentId | ) | const |
Return the point in scenarioSpace
for experiment experimentId
.
This returns the point in scenario space at which experiment experimentId
was executed
Definition at line 605 of file GPMSA.C.
References queso_require_less_msg, and queso_require_msg.
const std::vector< V * > & QUESO::GPMSAFactory< V, M >::experimentScenarios | ( | ) | const |
Return all points in scenarioSpace
for all experiments.
This returns all points in scenario space at which experiments were executed
Definition at line 617 of file GPMSA.C.
const GPMSAEmulator< V, M > & QUESO::GPMSAFactory< V, M >::getGPMSAEmulator | ( | ) | const |
Return the GPMSAEmulator likelihood object.
Definition at line 657 of file GPMSA.C.
M & QUESO::GPMSAFactory< V, M >::getObservationErrorCovariance | ( | unsigned int | simulationNumber | ) |
Definition at line 936 of file GPMSA.C.
References queso_assert_equal_to, and queso_assert_less.
const M & QUESO::GPMSAFactory< V, M >::getObservationErrorCovariance | ( | unsigned int | simulationNumber | ) | const |
Definition at line 948 of file GPMSA.C.
References queso_assert_equal_to, and queso_assert_less.
unsigned int QUESO::GPMSAFactory< V, M >::numExperiments | ( | ) | const |
Return number of experiments.
Definition at line 513 of file GPMSA.C.
Referenced by QUESO::GPMSAFactory< V, M >::GPMSAFactory().
unsigned int QUESO::GPMSAFactory< V, M >::numSimulations | ( | ) | const |
const VectorSpace< V, M > & QUESO::GPMSAFactory< V, M >::parameterSpace | ( | ) | const |
Return the vector space in which parameters live.
Definition at line 527 of file GPMSA.C.
void QUESO::GPMSAFactory< V, M >::print | ( | std::ostream & | os | ) | const |
const ConcatenatedVectorRV< V, M > & QUESO::GPMSAFactory< V, M >::prior | ( | ) | const |
Definition at line 960 of file GPMSA.C.
const VectorSpace< V, M > & QUESO::GPMSAFactory< V, M >::scenarioSpace | ( | ) | const |
Return the vector space in which scenarios live.
Definition at line 520 of file GPMSA.C.
void QUESO::GPMSAFactory< V, M >::setDiscrepancyBases | ( | const std::vector< V * > & | discrepancyBases | ) |
Add all discrepancy bases to this
.
This method takes a vector of all the bases to use in the discrepancy model and stores a copy.
The user is responsible for normalizing each basis vector to be consistent with the discrepancy precision coefficients which will multiply them.
If no discrepancy basis is provided, a single "1 for each output" vector will be used.
For now we will assume that outputs are the same for each experiment (tau_ij and phi_ij are independent of i, in the notation of Higdon et al), and so each discrepancy basis can be expressed as a vector indexed by output index.
Definition at line 918 of file GPMSA.C.
References queso_assert_equal_to.
void QUESO::GPMSAFactory< V, M >::setUpEmulator | ( | ) |
Definition at line 699 of file GPMSA.C.
References QUESO::Map::Comm(), and k.
void QUESO::GPMSAFactory< V, M >::setUpHyperpriors | ( | ) |
Definition at line 975 of file GPMSA.C.
References QUESO::MpiComm::Comm(), k, queso_assert_equal_to, and QUESO::scalarProduct().
const V & QUESO::GPMSAFactory< V, M >::simulationOutput | ( | unsigned int | simulationId | ) | const |
Return the simulation output for simulation simulationId
.
The returned vector is a point in simulationOutputSpace
Definition at line 586 of file GPMSA.C.
References queso_require_less_msg, and queso_require_msg.
const std::vector< V * > & QUESO::GPMSAFactory< V, M >::simulationOutputs | ( | ) | const |
Return all points in simulationOutputSpace
for all simulations.
This returns all points in simulation output space at which simulations were executed
Definition at line 598 of file GPMSA.C.
const VectorSpace< V, M > & QUESO::GPMSAFactory< V, M >::simulationOutputSpace | ( | ) | const |
Return the vector space in which simulations live.
Definition at line 534 of file GPMSA.C.
const V & QUESO::GPMSAFactory< V, M >::simulationParameter | ( | unsigned int | simulationId | ) | const |
Return the point in parameterSpace
for simulation simulationId
.
This returns the point in parameter space at which simulation simulationId
was executed
Definition at line 567 of file GPMSA.C.
References queso_require_less_msg, and queso_require_msg.
const std::vector< V * > & QUESO::GPMSAFactory< V, M >::simulationParameters | ( | ) | const |
Return all points in parameterSpace
for all simulations.
This returns all points in parameter space at which simulations were executed
Definition at line 579 of file GPMSA.C.
const V & QUESO::GPMSAFactory< V, M >::simulationScenario | ( | unsigned int | simulationId | ) | const |
Return the point in scenarioSpace
for simulation simulationId
.
This returns the point in scenario space at which simulation simulationId
was executed
Definition at line 548 of file GPMSA.C.
References queso_require_less_msg, and queso_require_msg.
const std::vector< V * > & QUESO::GPMSAFactory< V, M >::simulationScenarios | ( | ) | const |
Return all points in scenarioSpace
for all simulations.
This returns all points in scenario space at which simulations were executed
Definition at line 560 of file GPMSA.C.
|
friend |
|
private |
Definition at line 454 of file GPMSA.h.
Referenced by QUESO::GPMSAFactory< V, M >::GPMSAFactory().
ScopedPtr<M>::Type QUESO::GPMSAFactory< V, M >::BT_Wy_B_inv |
ScopedPtr<BoxSubset<V, M> >::Type QUESO::GPMSAFactory< V, M >::discrepancyCorrelationDomain |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::discrepancyCorrelationMax |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::discrepancyCorrelationMin |
ScopedPtr<VectorSpace<V, M> >::Type QUESO::GPMSAFactory< V, M >::discrepancyCorrelationSpace |
ScopedPtr<BoxSubset<V, M> >::Type QUESO::GPMSAFactory< V, M >::discrepancyPrecisionDomain |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::discrepancyPrecisionMax |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::discrepancyPrecisionMin |
ScopedPtr<BoxSubset<V, M> >::Type QUESO::GPMSAFactory< V, M >::emulatorCorrelationDomain |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::emulatorCorrelationMax |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::emulatorCorrelationMin |
ScopedPtr<VectorSpace<V, M> >::Type QUESO::GPMSAFactory< V, M >::emulatorCorrelationSpace |
ScopedPtr<BoxSubset<V, M> >::Type QUESO::GPMSAFactory< V, M >::emulatorDataPrecisionDomain |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::emulatorDataPrecisionMax |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::emulatorDataPrecisionMin |
ScopedPtr<BoxSubset<V, M> >::Type QUESO::GPMSAFactory< V, M >::emulatorMeanDomain |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::emulatorMeanMax |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::emulatorMeanMin |
ScopedPtr<BoxSubset<V, M> >::Type QUESO::GPMSAFactory< V, M >::emulatorPrecisionDomain |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::emulatorPrecisionMax |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::emulatorPrecisionMin |
ScopedPtr<VectorSpace<V, M> >::Type QUESO::GPMSAFactory< V, M >::emulatorPrecisionSpace |
ScopedPtr<GPMSAEmulator<V, M> >::Type QUESO::GPMSAFactory< V, M >::gpmsaEmulator |
ScopedPtr<M>::Type QUESO::GPMSAFactory< V, M >::K |
ScopedPtr<M>::Type QUESO::GPMSAFactory< V, M >::KT_K_inv |
ScopedPtr<M>::Type QUESO::GPMSAFactory< V, M >::m_BMatrix |
bool QUESO::GPMSAFactory< V, M >::m_constructedGP |
std::vector<V> QUESO::GPMSAFactory< V, M >::m_discrepancyBases |
Definition at line 328 of file GPMSA.h.
Referenced by QUESO::GPMSAFactory< V, M >::GPMSAFactory().
ScopedPtr<BetaVectorRV<V, M> >::Type QUESO::GPMSAFactory< V, M >::m_discrepancyCorrelationStrength |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::m_discrepancyCorrelationStrengthAlphaVec |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::m_discrepancyCorrelationStrengthBetaVec |
std::vector<M> QUESO::GPMSAFactory< V, M >::m_discrepancyMatrices |
ScopedPtr<GammaVectorRV<V, M> >::Type QUESO::GPMSAFactory< V, M >::m_discrepancyPrecision |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::m_discrepancyPrecisionScaleVec |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::m_discrepancyPrecisionShapeVec |
ScopedPtr<BetaVectorRV<V, M> >::Type QUESO::GPMSAFactory< V, M >::m_emulatorCorrelationStrength |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::m_emulatorCorrelationStrengthAlphaVec |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::m_emulatorCorrelationStrengthBetaVec |
ScopedPtr<GammaVectorRV<V, M> >::Type QUESO::GPMSAFactory< V, M >::m_emulatorDataPrecision |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::m_emulatorDataPrecisionScaleVec |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::m_emulatorDataPrecisionShapeVec |
ScopedPtr<UniformVectorRV<V, M> >::Type QUESO::GPMSAFactory< V, M >::m_emulatorMean |
ScopedPtr<GammaVectorRV<V, M> >::Type QUESO::GPMSAFactory< V, M >::m_emulatorPrecision |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::m_emulatorPrecisionScaleVec |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::m_emulatorPrecisionShapeVec |
const BaseEnvironment& QUESO::GPMSAFactory< V, M >::m_env |
Definition at line 307 of file GPMSA.h.
Referenced by QUESO::GPMSAFactory< V, M >::GPMSAFactory().
const M* QUESO::GPMSAFactory< V, M >::m_experimentErrors |
std::vector<V *> QUESO::GPMSAFactory< V, M >::m_experimentOutputs |
const VectorSpace<V, M>& QUESO::GPMSAFactory< V, M >::m_experimentOutputSpace |
Definition at line 314 of file GPMSA.h.
Referenced by QUESO::GPMSAFactory< V, M >::GPMSAFactory().
std::vector<V *> QUESO::GPMSAFactory< V, M >::m_experimentScenarios |
unsigned int QUESO::GPMSAFactory< V, M >::m_numExperimentAdds |
unsigned int QUESO::GPMSAFactory< V, M >::m_numExperiments |
unsigned int QUESO::GPMSAFactory< V, M >::m_numSimulationAdds |
unsigned int QUESO::GPMSAFactory< V, M >::m_numSimulations |
ScopedPtr<GammaVectorRV<V, M> >::Type QUESO::GPMSAFactory< V, M >::m_observationalPrecision |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::m_observationalPrecisionScaleVec |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::m_observationalPrecisionShapeVec |
std::vector<M> QUESO::GPMSAFactory< V, M >::m_observationErrorMatrices |
Definition at line 330 of file GPMSA.h.
Referenced by QUESO::GPMSAFactory< V, M >::GPMSAFactory().
ScopedPtr<M>::Type QUESO::GPMSAFactory< V, M >::m_observationErrorMatrix |
|
private |
Definition at line 455 of file GPMSA.h.
Referenced by QUESO::GPMSAFactory< V, M >::GPMSAFactory().
const BaseVectorRV<V, M>& QUESO::GPMSAFactory< V, M >::m_parameterPrior |
const VectorSpace<V, M>& QUESO::GPMSAFactory< V, M >::m_parameterSpace |
const VectorSpace<V, M>& QUESO::GPMSAFactory< V, M >::m_scenarioSpace |
std::vector<V *> QUESO::GPMSAFactory< V, M >::m_simulationOutputs |
const VectorSpace<V, M>& QUESO::GPMSAFactory< V, M >::m_simulationOutputSpace |
std::vector<V *> QUESO::GPMSAFactory< V, M >::m_simulationParameters |
std::vector<V *> QUESO::GPMSAFactory< V, M >::m_simulationScenarios |
ScopedPtr<ConcatenatedVectorRV<V, M> >::Type QUESO::GPMSAFactory< V, M >::m_totalPrior |
ScopedPtr<M>::Type QUESO::GPMSAFactory< V, M >::m_TruncatedSVD_simulationOutputs |
ScopedPtr<BoxSubset<V, M> >::Type QUESO::GPMSAFactory< V, M >::observationalPrecisionDomain |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::observationalPrecisionMax |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::observationalPrecisionMin |
ScopedPtr<VectorSpace<V, M> >::Type QUESO::GPMSAFactory< V, M >::observationalPrecisionSpace |
ScopedPtr<VectorSpace<V, M> >::Type QUESO::GPMSAFactory< V, M >::oneDSpace |
std::vector<const BaseVectorRV<V, M> *> QUESO::GPMSAFactory< V, M >::priors |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::residual |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::simulationOutputMeans |
ScopedPtr<BoxSubset<V, M> >::Type QUESO::GPMSAFactory< V, M >::totalDomain |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::totalMaxs |
ScopedPtr<V>::Type QUESO::GPMSAFactory< V, M >::totalMins |
ScopedPtr<VectorSpace<V, M> >::Type QUESO::GPMSAFactory< V, M >::totalSpace |