25 #ifndef UQ_GPMSA_HELPER_H
26 #define UQ_GPMSA_HELPER_H
30 #include <queso/Environment.h>
31 #include <queso/ScalarFunction.h>
32 #include <queso/VectorSpace.h>
33 #include <queso/VectorRV.h>
34 #include <queso/ConcatenatedVectorRV.h>
35 #include <queso/GammaVectorRV.h>
36 #include <queso/BetaVectorRV.h>
37 #include <queso/UniformVectorRV.h>
38 #include <queso/GPMSAOptions.h>
45 template <
class V = GslVector,
class M = GslMatrix>
66 virtual double lnValue(
const V & domainVector,
67 const V * domainDirection,
70 V * hessianEffect)
const;
73 const V * domainDirection,
76 V * hessianEffect)
const;
98 template <
class V = GslVector,
class M = GslMatrix>
224 V & simulationParameter,
225 V & simulationOutput);
233 const std::vector<V *> & simulationParameters,
234 const std::vector<V *> & simulationOutputs);
247 const std::vector<V *> & experimentOutputs,
248 const M * experimentErrors);
252 void print(std::ostream& os)
const;
336 std::vector<const BaseVectorRV<V, M> *>
priors;
369 #endif // UQ_GPMSA_HELPER_H
V * discrepancyCorrelationMin
~GPMSAFactory()
Destructor.
A class representing a uniform vector RV.
const VectorSpace< V, M > & m_experimentOutputSpace
GammaVectorRV< V, M > * m_discrepancyPrecision
const std::vector< V * > & m_experimentScenarios
const std::vector< V * > & m_experimentOutputs
V * m_discrepancyCorrelationStrengthBetaVec
A templated class for handling sets.
BetaVectorRV< V, M > * m_discrepancyCorrelationStrength
VectorSpace< V, M > * totalSpace
const V & simulationParameter(unsigned int simulationId) const
Return the point in parameterSpace for simulation simulationId.
V * m_emulatorPrecisionScaleVec
const std::vector< V * > & m_simulationOutputs
BetaVectorRV< V, M > * m_emulatorCorrelationStrength
BoxSubset< V, M > * emulatorMeanDomain
void addSimulations(const std::vector< V * > &simulationScenarios, const std::vector< V * > &simulationParameters, const std::vector< V * > &simulationOutputs)
Adds multiple simulations to this.
A class representing a vector RV constructed via Gamma distribution.
const BaseEnvironment & env() const
Return the QUESO environment.
V * emulatorCorrelationMax
A templated base class for handling vector RV.
unsigned int m_numExperiments
virtual double lnValue(const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const
Logarithm of the value of the scalar function.
const std::vector< V * > & simulationParameters() const
Return all points in parameterSpace for all simulations.
BoxSubset< V, M > * emulatorCorrelationDomain
BoxSubset< V, M > * emulatorPrecisionDomain
std::vector< V * > m_experimentOutputs
const M & m_experimentErrors
const unsigned int m_numSimulations
V * m_emulatorDataPrecisionShapeVec
const ConcatenatedVectorRV< V, M > & prior() const
GPMSAEmulator(const VectorSet< V, M > &domain, const VectorSpace< V, M > &m_scenarioSpace, const VectorSpace< V, M > &m_parameterSpace, const VectorSpace< V, M > &m_simulationOutputSpace, const VectorSpace< V, M > &m_experimentOutputSpace, const unsigned int m_numSimulations, const unsigned int m_numExperiments, const std::vector< V * > &m_simulationScenarios, const std::vector< V * > &m_simulationParameters, const std::vector< V * > &m_simulationOutputs, const std::vector< V * > &m_experimentScenarios, const std::vector< V * > &m_experimentOutputs, const M &m_experimentErrors, const ConcatenatedVectorRV< V, M > &m_totalPrior)
A class representing a vector RV constructed via Beta distribution.
const std::vector< V * > & m_simulationScenarios
const std::vector< V * > & simulationScenarios() const
Return all points in scenarioSpace for all simulations.
A templated (base) class for handling scalar functions.
const std::vector< V * > & m_simulationParameters
std::vector< V * > m_simulationParameters
V * emulatorCorrelationMin
std::vector< V * > m_simulationOutputs
V * discrepancyPrecisionMax
V * m_discrepancyPrecisionShapeVec
unsigned int numExperiments() const
Return number of experiments.
V * emulatorDataPrecisionMax
const std::vector< V * > & experimentScenarios() const
Return all points in scenarioSpace for all experiments.
const V & simulationScenario(unsigned int simulationId) const
Return the point in scenarioSpace for simulation simulationId.
const VectorSpace< V, M > & m_parameterSpace
const V & experimentScenario(unsigned int experimentId) const
Return the point in scenarioSpace for experiment experimentId.
const std::vector< V * > & experimentOutputs() const
Return all points in experimentOutputSpace for all experiments.
const unsigned int m_numExperiments
virtual double actualValue(const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const
Actual value of the scalar function.
unsigned int m_numSimulations
friend std::ostream & operator<<(std::ostream &os, const GPMSAFactory< V, M > &obj)
unsigned int m_numSimulationAdds
V * m_emulatorPrecisionShapeVec
V * m_emulatorDataPrecisionScaleVec
V * discrepancyCorrelationMax
V * m_emulatorCorrelationStrengthAlphaVec
V * m_emulatorCorrelationStrengthBetaVec
const BaseVectorRV< V, M > & m_parameterPrior
UniformVectorRV< V, M > * m_emulatorMean
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
VectorSpace< V, M > * emulatorCorrelationSpace
VectorSpace< V, M > * discrepancyCorrelationSpace
VectorSpace< V, M > * oneDSpace
const VectorSpace< V, M > & parameterSpace() const
Return the vector space in which parameters live.
V * emulatorDataPrecisionMin
GammaVectorRV< V, M > * m_emulatorPrecision
BoxSubset< V, M > * discrepancyPrecisionDomain
const VectorSpace< V, M > & simulationOutputSpace() const
Return the vector space in which simulations live.
const VectorSpace< V, M > & m_experimentOutputSpace
const ConcatenatedVectorRV< V, M > & m_totalPrior
GammaVectorRV< V, M > * m_emulatorDataPrecision
V * m_discrepancyPrecisionScaleVec
This class defines the options that specify the behaviour of the Gaussian process emulator...
const VectorSpace< V, M > & m_scenarioSpace
BoxSubset< V, M > * discrepancyCorrelationDomain
Class representing a subset of a vector space shaped like a hypercube.
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.
const VectorSpace< V, M > & m_parameterSpace
void addSimulation(V &simulationScenario, V &simulationParameter, V &simulationOutput)
Add a simulation to this.
const BaseEnvironment & m_env
const std::vector< V * > & simulationOutputs() const
Return all points in simulationOutputSpace for all simulations.
void print(std::ostream &os) const
unsigned int numSimulations() const
Return number of simulations.
A class representing concatenated vector RVs.
const M & experimentErrors() const
Return all observation error covarince matrices for all experiments.
std::vector< const BaseVectorRV< V, M > * > priors
std::vector< V * > m_experimentScenarios
BoxSubset< V, M > * totalDomain
const V & experimentOutput(unsigned int experimentId) const
Return the experiment output for experiment experimentId.
V * m_discrepancyCorrelationStrengthAlphaVec
const VectorSpace< V, M > & scenarioSpace() const
Return the vector space in which scenarios live.
A class representing a vector space.
const M * m_experimentErrors
const VectorSpace< V, M > & m_scenarioSpace
V * discrepancyPrecisionMin
BoxSubset< V, M > * emulatorDataPrecisionDomain
const V & simulationOutput(unsigned int simulationId) const
Return the simulation output for simulation simulationId.
const VectorSpace< V, M > & m_simulationOutputSpace
unsigned int m_numExperimentAdds
const GPMSAEmulator< V, M > & getGPMSAEmulator() const
Return the GPMSAEmulator likelihood object.
void addExperiments(const std::vector< V * > &experimentScenarios, const std::vector< V * > &experimentOutputs, const M *experimentErrors)
Add all experiments to this.
std::vector< V * > m_simulationScenarios
ConcatenatedVectorRV< V, M > * m_totalPrior
GPMSAEmulator< V, M > * gpmsaEmulator
const VectorSpace< V, M > & experimentOutputSpace() const
Return the vector space in which experiments live.
const VectorSpace< V, M > & m_simulationOutputSpace