queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QUESO::GPMSAEmulator< V, M > Class Template Reference

#include <GPMSA.h>

Inheritance diagram for QUESO::GPMSAEmulator< V, M >:
QUESO::BaseScalarFunction< V, M >

Public Member Functions

 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< typename SharedPtr< V >::Type > &m_simulationScenarios, const std::vector< typename SharedPtr< V >::Type > &m_simulationParameters, const std::vector< typename SharedPtr< V >::Type > &m_simulationOutputs, const std::vector< typename SharedPtr< V >::Type > &m_experimentScenarios, const std::vector< typename SharedPtr< V >::Type > &m_experimentOutputs, const std::vector< typename SharedPtr< V >::Type > &m_discrepancyBases, const std::vector< typename SharedPtr< M >::Type > &m_observationErrorMatrices, const typename SharedPtr< M >::Type &m_observationErrorMatrix, const ConcatenatedVectorRV< V, M > &m_totalPrior, const V &residual_in, const M &BT_Wy_B_inv_in, const M &KT_K_inv_in, const GPMSAOptions &opts)
 
virtual ~GPMSAEmulator ()
 
virtual double lnValue (const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const
 Logarithm of the value of the scalar function. Deprecated. More...
 
virtual double actualValue (const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const
 Actual value of the scalar function. More...
 
- Public Member Functions inherited from QUESO::BaseScalarFunction< V, M >
void setFiniteDifferenceStepSize (double fdStepSize)
 Sets the step size for finite differencing gradients. More...
 
void setFiniteDifferenceStepSize (unsigned int i, double fdStepSize)
 
 BaseScalarFunction (const char *prefix, const VectorSet< V, M > &domainSet)
 Default constructor. More...
 
virtual ~BaseScalarFunction ()
 Destructor. More...
 
const VectorSet< V, M > & domainSet () const
 Access to the protected attribute m_domainSet: domain set of the scalar function. More...
 
virtual double lnValue (const V &domainVector) const
 Returns the logarithm of the function at domainVector. More...
 
virtual double lnValue (const V &domainVector, V &gradVector) const
 Returns the logarithm of the function and its gradient at domainVector. More...
 
virtual double lnValue (const V &domainVector, V &gradVector, const V &domainDirection, V &hessianEffect) const
 

Public Attributes

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< typename
SharedPtr< V >::Type > & 
m_simulationScenarios
 
const std::vector< typename
SharedPtr< V >::Type > & 
m_simulationParameters
 
const std::vector< typename
SharedPtr< V >::Type > & 
m_simulationOutputs
 
const std::vector< typename
SharedPtr< V >::Type > & 
m_experimentScenarios
 
const std::vector< typename
SharedPtr< V >::Type > & 
m_experimentOutputs
 
std::vector< typename
SharedPtr< V >::Type > 
m_discrepancyBases
 
const std::vector< typename
SharedPtr< M >::Type > & 
m_observationErrorMatrices
 
SharedPtr< M >::Type m_observationErrorMatrix
 
unsigned int num_svd_terms
 
const ConcatenatedVectorRV< V,
M > & 
m_totalPrior
 
const V & residual
 
const M & BT_Wy_B_inv
 
const M & KT_K_inv
 
const GPMSAOptionsm_opts
 

Additional Inherited Members

- Protected Attributes inherited from QUESO::BaseScalarFunction< V, M >
const BaseEnvironmentm_env
 
std::string m_prefix
 
const VectorSet< V, M > & m_domainSet
 Domain set of the scalar function. More...
 

Detailed Description

template<class V = GslVector, class M = GslMatrix>
class QUESO::GPMSAEmulator< V, M >

Definition at line 48 of file GPMSA.h.

Constructor & Destructor Documentation

template<class V , class M >
QUESO::GPMSAEmulator< V, M >::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< typename SharedPtr< V >::Type > &  m_simulationScenarios,
const std::vector< typename SharedPtr< V >::Type > &  m_simulationParameters,
const std::vector< typename SharedPtr< V >::Type > &  m_simulationOutputs,
const std::vector< typename SharedPtr< V >::Type > &  m_experimentScenarios,
const std::vector< typename SharedPtr< V >::Type > &  m_experimentOutputs,
const std::vector< typename SharedPtr< V >::Type > &  m_discrepancyBases,
const std::vector< typename SharedPtr< M >::Type > &  m_observationErrorMatrices,
const typename SharedPtr< M >::Type &  m_observationErrorMatrix,
const ConcatenatedVectorRV< V, M > &  m_totalPrior,
const V &  residual_in,
const M &  BT_Wy_B_inv_in,
const M &  KT_K_inv_in,
const GPMSAOptions opts 
)

Definition at line 32 of file GPMSA.C.

References QUESO::VectorSpace< V, M >::dimLocal(), QUESO::GPMSAOptions::m_maxEmulatorBasisVectors, QUESO::GPMSAEmulator< V, M >::m_opts, QUESO::GPMSAEmulator< V, M >::m_simulationOutputs, and QUESO::GPMSAEmulator< V, M >::num_svd_terms.

53  :
54  BaseScalarFunction<V, M>("", m_totalPrior.imageSet()),
70  residual(residual_in),
71  BT_Wy_B_inv(BT_Wy_B_inv_in),
72  KT_K_inv(KT_K_inv_in),
73  m_opts(opts)
74 {
75  queso_assert_greater(m_numSimulations, 0);
76 
77  queso_assert_equal_to
78  (m_simulationOutputs[0]->map().Comm().NumProc(), 1);
79 
80  const unsigned int numOutputs =
81  this->m_experimentOutputSpace.dimLocal();
82 
84  std::min((unsigned int)(this->m_opts.m_maxEmulatorBasisVectors), numOutputs) :
85  numOutputs;
86 }
std::vector< typename SharedPtr< V >::Type > m_discrepancyBases
Definition: GPMSA.h:100
const VectorSpace< V, M > & m_parameterSpace
Definition: GPMSA.h:87
const VectorSpace< V, M > & m_simulationOutputSpace
Definition: GPMSA.h:88
const ConcatenatedVectorRV< V, M > & m_totalPrior
Definition: GPMSA.h:112
const M & BT_Wy_B_inv
Definition: GPMSA.h:119
const std::vector< typename SharedPtr< M >::Type > & m_observationErrorMatrices
Definition: GPMSA.h:102
int m_maxEmulatorBasisVectors
The maximum number of basis vectors to use for approximating.
Definition: GPMSAOptions.h:80
unsigned int num_svd_terms
Definition: GPMSA.h:110
const std::vector< typename SharedPtr< V >::Type > & m_experimentOutputs
Definition: GPMSA.h:98
const GPMSAOptions & m_opts
Definition: GPMSA.h:123
const unsigned int m_numExperiments
Definition: GPMSA.h:92
const V & residual
Definition: GPMSA.h:117
const M & KT_K_inv
Definition: GPMSA.h:121
const std::vector< typename SharedPtr< V >::Type > & m_simulationParameters
Definition: GPMSA.h:95
const VectorSpace< V, M > & m_experimentOutputSpace
Definition: GPMSA.h:89
const std::vector< typename SharedPtr< V >::Type > & m_simulationOutputs
Definition: GPMSA.h:96
const std::vector< typename SharedPtr< V >::Type > & m_experimentScenarios
Definition: GPMSA.h:97
const std::vector< typename SharedPtr< V >::Type > & m_simulationScenarios
Definition: GPMSA.h:94
const VectorSpace< V, M > & m_scenarioSpace
Definition: GPMSA.h:86
const unsigned int m_numSimulations
Definition: GPMSA.h:91
SharedPtr< M >::Type m_observationErrorMatrix
Definition: GPMSA.h:105
template<class V , class M >
QUESO::GPMSAEmulator< V, M >::~GPMSAEmulator ( )
virtual

Definition at line 89 of file GPMSA.C.

90 {
91  // heap allocations get deleted via ScopedPtr
92 }

Member Function Documentation

template<class V , class M >
double QUESO::GPMSAEmulator< V, M >::actualValue ( const V &  domainVector,
const V *  domainDirection,
V *  gradVector,
M *  hessianMatrix,
V *  hessianEffect 
) const
virtual

Actual value of the scalar function.

Implements QUESO::BaseScalarFunction< V, M >.

Definition at line 443 of file GPMSA.C.

448 {
449  // Do nothing?
450  return 1.0;
451 }
template<class V , class M >
double QUESO::GPMSAEmulator< V, M >::lnValue ( const V &  domainVector,
const V *  domainDirection,
V *  gradVector,
M *  hessianMatrix,
V *  hessianEffect 
) const
virtual

Logarithm of the value of the scalar function. Deprecated.

Pointers will be NULL if derivative information is not required by QUESO.

Default implementation throws an exception.

Reimplemented from QUESO::BaseScalarFunction< V, M >.

Definition at line 96 of file GPMSA.C.

References QUESO::MpiComm::Comm(), and QUESO::queso_isnan().

101 {
102  // Components of domainVector:
103  // theta(1) // = "theta", "t" in Higdon et. al. 2008
104  // theta(2)
105  // ...
106  // theta(dimParameter)
107  // truncation_error_precision // = "lambda_eta", only exists in
108  // vector case
109  // emulator_precision(1) // = "lambda_{w i}" in vector case
110  // ... // = "lambda_eta" in scalar case,
111  // which is unrelated to the
112  // vector case lambda_eta
113  // emulator_precision(num_svd_terms)
114  // emulator_corr_strength(1) // = "rho_{eta k}"
115  // ... // dimScenario = "p_x", dimParameter = "p_t"
116  // emulator_corr_strength(dimScenario + dimParameter)
117  // discrepancy_precision(1) // = "lambda_delta" in scalar case,
118  // // "lambda_{v i}" in vector
119  // ...
120  // discrepancy_precision(F) // FIXME: F = 1, |G_1| = p_delta, for now.
121  // discrepancy_corr_strength(1) // = "rho_{delta k}" in scalar case,
122  // ... // "rho_{v i}" in vector
123  // discrepancy_corr_strength(dimScenario)
124  // emulator_data_precision(1) // = "small white noise", "small ridge"
125  // observation_error_precision // = "lambda_y", iff user-requested
126 
127  // Other variables:
128  // m_numSimulations // = "m"
129  // m_numExperiments // = "n"
130  // m_simulationScenarios // = "eta"
131  // m_experimentScenarios // = "y"
132  // m_experimentErrors // = "Sigma_y"; now obsoleted by "W_y"
133  // numOutputs // = "n_eta"
134  // // "n_y" := sum(n_y_i)
135  // // (== n*n_eta for us for now)
136  // dimScenario // = "p_x"
137  // num_svd_terms // = "p_eta"
138  // num_discrepancy_bases // = "p_delta"
139  // m_TruncatedSVD_simulationOutputs // = "K_eta"
140  // covMatrix // = "Sigma_D" in scalar case,
141  // "Sigma_zhat" in vector
142  // m_discrepancyMatrices // = "D_i"
143  // m_observationErrorMatrices // = "W_i"
144  // m_observationErrorMatrix // = "W_y"
145  // m_BMatrix // = "B"
146  // num_discrepancy_groups // = "F"
147  // m_emulatorPrecisionShapeVec // = "a_eta"
148  // 1.0/m_emulatorPrecisionScaleVec // = "b_eta"
149  // m_observationalPrecisionShapeVec // = "a_y"
150  // 1.0/m_observationalPrecisionScaleVec // = "b_y"
151 
152  // Construct covariance matrix
153  const unsigned int totalRuns = this->m_numExperiments + this->m_numSimulations;
154  const unsigned int numOutputs = this->m_experimentOutputSpace.dimLocal();
155  const unsigned int totalOutputs = totalRuns * numOutputs;
156  const unsigned int num_discrepancy_bases = m_discrepancyBases.size();
157  const unsigned int residualSize = (numOutputs == 1) ? totalOutputs :
158  totalRuns * num_svd_terms + m_numExperiments * num_discrepancy_bases;
159 
160  double prodScenario = 1.0;
161  double prodParameter = 1.0;
162  double prodDiscrepancy = 1.0;
163  unsigned int dimScenario = (this->m_scenarioSpace).dimLocal();
164  unsigned int dimParameter = (this->m_parameterSpace).dimLocal();
165 
166  // Length of prior+hyperprior inputs
167  unsigned int dimSum = 2 +
168  (this->num_svd_terms < numOutputs) +
169  (numOutputs > 1) +
171  num_svd_terms +
172  dimParameter +
173  dimParameter +
174  dimScenario +
175  dimScenario; // yum
176 
177  // Offset for Sigma_eta equivalent in vector case
178  const unsigned int offset1 = (numOutputs == 1) ?
179  0 : m_numExperiments * num_discrepancy_bases;
180 
181  // Offset for Sigma_w in vector case
182  const unsigned int offset1b = offset1 +
184 
185  // Offset for lambda_eta term in zhat covariance in vector case
186  const unsigned int offset2 = (numOutputs == 1) ?
187  0 : m_numExperiments * (num_discrepancy_bases + num_svd_terms);
188 
189  // This is cumbersome. All I want is a matrix.
190  const MpiComm & comm = domainVector.map().Comm();
191  Map z_map(residualSize, 0, comm);
192  M covMatrix(this->m_env, z_map, residualSize);
193 
194  typename SharedPtr<V>::Type domainVectorParameter
195  (new V(*(this->m_simulationParameters[0])));
196  for (unsigned int k = 0; k < dimParameter; k++) {
197  queso_assert (!queso_isnan(domainVector[k]));
198  (*domainVectorParameter)[k] = domainVector[k];
199  }
200 
201  // This for loop is a disaster and could do with a *lot* of optimisation
202  for (unsigned int i = 0; i < totalRuns; i++) {
203 
204  // Scenario and uncertain input variables, *not* normalized
205  typename SharedPtr<V>::Type scenario1;
206  typename SharedPtr<V>::Type parameter1;
207 
208  // Decide whether to do experiment part of the covariance matrix
209  // Get i-th simulation-parameter pair
210  if (i < this->m_numExperiments) {
211  // Experiment scenario (known)
212  scenario1 = (this->m_experimentScenarios)[i];
213 
214  // Experiment parameter (unknown)
215  parameter1 = domainVectorParameter;
216  }
217  else {
218  scenario1 =
219  (this->m_simulationScenarios)[i-this->m_numExperiments];
220  parameter1 =
221  (this->m_simulationParameters)[i-this->m_numExperiments];
222  }
223 
224  for (unsigned int j = 0; j < totalRuns; j++) {
225 
226  // Scenario and uncertain input variables, *not* normalized
227  typename SharedPtr<V>::Type scenario2;
228  typename SharedPtr<V>::Type parameter2;
229 
230  if (j < this->m_numExperiments) {
231  scenario2 = (this->m_experimentScenarios)[j];
232  parameter2 = domainVectorParameter;
233  }
234  else {
235  scenario2 =
236  (this->m_simulationScenarios)[j-this->m_numExperiments];
237  parameter2 =
238  (this->m_simulationParameters)[j-this->m_numExperiments];
239  }
240 
241  // Emulator component // = first term in (1)
242  prodScenario = 1.0;
243  unsigned int emulatorCorrStrStart =
244  dimParameter + (this->num_svd_terms < numOutputs) + num_svd_terms;
245  for (unsigned int k = 0; k < dimScenario; k++) {
246  const double & emulator_corr_strength =
247  domainVector[emulatorCorrStrStart+k];
248  double scenario_param1 =
249  m_opts.normalized_scenario_parameter(k, (*scenario1)[k]);
250  double scenario_param2 =
251  m_opts.normalized_scenario_parameter(k, (*scenario2)[k]);
252  prodScenario *= std::pow(emulator_corr_strength,
253  4.0 * (scenario_param1 - scenario_param2) *
254  (scenario_param1 - scenario_param2));
255  }
256 
257  queso_assert (!queso_isnan(prodScenario));
258 
259  // = second term in (1)
260  prodParameter = 1.0;
261  for (unsigned int k = 0; k < dimParameter; k++) {
262  queso_assert (!queso_isnan(domainVector[emulatorCorrStrStart+dimScenario+k]));
263  queso_assert (!queso_isnan((*parameter1)[k]));
264  queso_assert (!queso_isnan((*parameter2)[k]));
265  const double & emulator_corr_strength =
266  domainVector[emulatorCorrStrStart+dimScenario+k];
267  double uncertain_param1 =
268  m_opts.normalized_uncertain_parameter(k, (*parameter1)[k]);
269  double uncertain_param2 =
270  m_opts.normalized_uncertain_parameter(k, (*parameter2)[k]);
271  prodParameter *= std::pow(
272  emulator_corr_strength,
273  4.0 * (uncertain_param1 - uncertain_param2) *
274  (uncertain_param1 - uncertain_param2));
275  }
276 
277  queso_assert (!queso_isnan(prodParameter));
278 
279  // Sigma_eta in scalar case,
280  // [Sigma_u, Sigma_uw; Sigma_uw^T, Sigma_w] in vector case
281  for (unsigned int basis = 0; basis != num_svd_terms; ++basis)
282  {
283  // coefficient in (1)
284  // The relevant precision for Sigma_eta is lambda_eta; for
285  // Sigma_uw etc. it's lambda_wi and we skip lambda_eta
286  const double relevant_precision =
287  domainVector[dimParameter + basis +
288  (this->num_svd_terms<numOutputs) + (numOutputs>1)];
289  queso_assert_greater(relevant_precision, 0.0);
290 
291  const unsigned int stridei =
292  (i < this->m_numExperiments) ? m_numExperiments : m_numSimulations;
293  const unsigned int offseti =
294  (i < this->m_numExperiments) ? offset1 : offset1b - m_numExperiments;
295  const unsigned int stridej =
296  (j < this->m_numExperiments) ? m_numExperiments : m_numSimulations;
297  const unsigned int offsetj =
298  (j < this->m_numExperiments) ? offset1 : offset1b - m_numExperiments;
299 
300  covMatrix(offseti+basis*stridei+i,
301  offsetj+basis*stridej+j) =
302  prodScenario * prodParameter / relevant_precision;
303  }
304 
305  // If we're in the experiment cross correlation part, need extra
306  // foo: Sigma_delta/Sigma_v and Sigma_y
307  if (i < this->m_numExperiments && j < this->m_numExperiments) {
308  typename SharedPtr<V>::Type cross_scenario1 = (this->m_experimentScenarios)[i];
309  typename SharedPtr<V>::Type cross_scenario2 = (this->m_experimentScenarios)[j];
310  prodDiscrepancy = 1.0;
311  unsigned int discrepancyCorrStrStart =
312  dimParameter + num_svd_terms + dimParameter + dimScenario + 1 +
313  (this->num_svd_terms<numOutputs) + (numOutputs > 1);
314  for (unsigned int k = 0; k < dimScenario; k++) {
315  const double & discrepancy_corr_strength =
316  domainVector[discrepancyCorrStrStart+k];
317  double cross_scenario_param1 =
318  m_opts.normalized_scenario_parameter(k, (*cross_scenario1)[k]);
319  double cross_scenario_param2 =
320  m_opts.normalized_scenario_parameter(k, (*cross_scenario2)[k]);
321  prodDiscrepancy *=
322  std::pow(discrepancy_corr_strength, 4.0 *
323  (cross_scenario_param1 - cross_scenario_param2) *
324  (cross_scenario_param1 - cross_scenario_param2));
325  }
326 
327  const double discrepancy_precision =
328  domainVector[discrepancyCorrStrStart-1];
329  queso_assert_greater(discrepancy_precision, 0);
330  queso_assert (!queso_isnan(prodDiscrepancy));
331 
332  // Sigma_delta term from below (3) in univariate case
333  // Sigma_v term from p. 576 in multivariate case
334  const double R_v = prodDiscrepancy / discrepancy_precision;
335  for (unsigned int disc = 0; disc != num_discrepancy_bases;
336  ++disc)
337  covMatrix(disc*m_numExperiments+i,
338  disc*m_numExperiments+j) += R_v;
339 
340  if (numOutputs == 1)
341  {
342  // Experimental error comes in via W_y now.
343 /*
344  // Sigma_y term from below (3)
345  const double experimentalError =
346  this->m_experimentErrors(i,j);
347 */
348  const double experimentalError =
349  (*this->m_observationErrorMatrix)(i,j);
350 
351  queso_assert_greater_equal (experimentalError, 0);
352 
353  const double lambda_y =
355  domainVector[dimSum-1] : 1.0;
356 
357  covMatrix(i,j) += lambda_y * experimentalError;
358  }
359  }
360  }
361 
362  // Add small white noise component to diagonal to make stuff +ve def
363  // = "small ridge"
364  const double emulator_data_precision = domainVector[dimSum-1-(numOutputs>1)];
365  queso_assert_greater(emulator_data_precision, 0);
366  double nugget = 1.0 / emulator_data_precision;
367 
368  for (unsigned int disc = 0; disc != num_discrepancy_bases;
369  ++disc)
370  covMatrix(disc*m_numExperiments+i,
371  disc*m_numExperiments+i) += nugget;
372  }
373 
374  // If we're in the multivariate case, we've built the full Sigma_z
375  // matrix; now add the remaining Sigma_zhat terms
376  if (numOutputs > 1)
377  {
378  const double lambda_y =
380  domainVector[dimSum-1] : 1.0;
381  const double inv_lambda_y = 1.0/lambda_y;
382 
383  unsigned int BT_Wy_B_size = BT_Wy_B_inv.numCols();
384  for (unsigned int i=0; i != BT_Wy_B_size; ++i)
385  for (unsigned int j=0; j != BT_Wy_B_size; ++j)
386  covMatrix(i,j) += BT_Wy_B_inv(i,j) * inv_lambda_y;
387 
388  const double emulator_precision =
389  domainVector[dimParameter+1];
390  const double inv_emulator_precision = 1.0/emulator_precision;
391 
392  unsigned int KT_K_size = KT_K_inv.numCols();
393  for (unsigned int i=0; i != KT_K_size; ++i)
394  for (unsigned int j=0; j != KT_K_size; ++j)
395  covMatrix(i+offset2,j+offset2) +=
396  KT_K_inv(i,j) * inv_emulator_precision;
397  }
398 
399 
400  // Solve covMatrix * sol = residual
401  // = Sigma_D^-1 * (D - mu 1) from (3)
402  V sol(covMatrix.invertMultiply(residual));
403 
404  // Premultiply by residual^T as in (3)
405  double minus_2_log_lhd = 0.0;
406  // There's no dot product function in GslVector.
407  for (unsigned int i = 0; i < residualSize; i++) {
408  minus_2_log_lhd += sol[i] * residual[i];
409  }
410 
411 if (queso_isnan(minus_2_log_lhd))
412  for (unsigned int i = 0; i < residualSize; i++) {
413  if (queso_isnan(sol[i]))
414  std::cout << "NaN sol[" << i << ']' << std::endl;
415  if (queso_isnan(residual[i]))
416  std::cout << "NaN residual[" << i << ']' << std::endl;
417 
418  std::cout << "Covariance Matrix:" << std::endl;
419  covMatrix.print(std::cout);
420  }
421 
422 // std::cout << "minus_2_log_lhd = " << minus_2_log_lhd << std::endl;
423 
424  queso_assert_greater(minus_2_log_lhd, 0);
425 
426  double cov_det = covMatrix.determinant();
427 
428  if (cov_det <= 0)
429  {
430  std::cout << "Non-positive determinant for covMatrix = " << std::endl;
431  covMatrix.print(std::cout);
432  queso_error();
433  }
434 
435  minus_2_log_lhd += std::log(covMatrix.determinant());
436 
437  // Multiply by -1/2 coefficient from (3)
438  return -0.5 * minus_2_log_lhd;
439 }
std::vector< typename SharedPtr< V >::Type > m_discrepancyBases
Definition: GPMSA.h:100
const VectorSpace< V, M > & m_parameterSpace
Definition: GPMSA.h:87
double normalized_uncertain_parameter(unsigned int i, double physical_param) const
Calculate a normalized value from a physical value for the.
Definition: GPMSAOptions.C:568
const M & BT_Wy_B_inv
Definition: GPMSA.h:119
bool queso_isnan(T arg)
Definition: math_macros.h:39
unsigned int num_svd_terms
Definition: GPMSA.h:110
const GPMSAOptions & m_opts
Definition: GPMSA.h:123
const BaseEnvironment & m_env
Definition of a shared pointer.
const unsigned int m_numExperiments
Definition: GPMSA.h:92
double normalized_scenario_parameter(unsigned int i, double physical_param) const
Calculate a normalized value from a physical value for the.
Definition: GPMSAOptions.C:556
const V & residual
Definition: GPMSA.h:117
const M & KT_K_inv
Definition: GPMSA.h:121
const std::vector< typename SharedPtr< V >::Type > & m_simulationParameters
Definition: GPMSA.h:95
const VectorSpace< V, M > & m_experimentOutputSpace
Definition: GPMSA.h:89
bool m_calibrateObservationalPrecision
Whether to use an observational error precision hyperparameter.
Definition: GPMSAOptions.h:198
const std::vector< typename SharedPtr< V >::Type > & m_experimentScenarios
Definition: GPMSA.h:97
const std::vector< typename SharedPtr< V >::Type > & m_simulationScenarios
Definition: GPMSA.h:94
const VectorSpace< V, M > & m_scenarioSpace
Definition: GPMSA.h:86
const unsigned int m_numSimulations
Definition: GPMSA.h:91
SharedPtr< M >::Type m_observationErrorMatrix
Definition: GPMSA.h:105

Member Data Documentation

template<class V = GslVector, class M = GslMatrix>
const M& QUESO::GPMSAEmulator< V, M >::BT_Wy_B_inv

Definition at line 119 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
const M& QUESO::GPMSAEmulator< V, M >::KT_K_inv

Definition at line 121 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
std::vector<typename SharedPtr<V>::Type> QUESO::GPMSAEmulator< V, M >::m_discrepancyBases

Definition at line 100 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
const std::vector<typename SharedPtr<V>::Type>& QUESO::GPMSAEmulator< V, M >::m_experimentOutputs

Definition at line 98 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
const VectorSpace<V, M>& QUESO::GPMSAEmulator< V, M >::m_experimentOutputSpace

Definition at line 89 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
const std::vector<typename SharedPtr<V>::Type>& QUESO::GPMSAEmulator< V, M >::m_experimentScenarios

Definition at line 97 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
const unsigned int QUESO::GPMSAEmulator< V, M >::m_numExperiments

Definition at line 92 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
const unsigned int QUESO::GPMSAEmulator< V, M >::m_numSimulations

Definition at line 91 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
const std::vector<typename SharedPtr<M>::Type>& QUESO::GPMSAEmulator< V, M >::m_observationErrorMatrices

Definition at line 102 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
SharedPtr<M>::Type QUESO::GPMSAEmulator< V, M >::m_observationErrorMatrix

Definition at line 105 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
const GPMSAOptions& QUESO::GPMSAEmulator< V, M >::m_opts

Definition at line 123 of file GPMSA.h.

Referenced by QUESO::GPMSAEmulator< V, M >::GPMSAEmulator().

template<class V = GslVector, class M = GslMatrix>
const VectorSpace<V, M>& QUESO::GPMSAEmulator< V, M >::m_parameterSpace

Definition at line 87 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
const VectorSpace<V, M>& QUESO::GPMSAEmulator< V, M >::m_scenarioSpace

Definition at line 86 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
const std::vector<typename SharedPtr<V>::Type>& QUESO::GPMSAEmulator< V, M >::m_simulationOutputs

Definition at line 96 of file GPMSA.h.

Referenced by QUESO::GPMSAEmulator< V, M >::GPMSAEmulator().

template<class V = GslVector, class M = GslMatrix>
const VectorSpace<V, M>& QUESO::GPMSAEmulator< V, M >::m_simulationOutputSpace

Definition at line 88 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
const std::vector<typename SharedPtr<V>::Type>& QUESO::GPMSAEmulator< V, M >::m_simulationParameters

Definition at line 95 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
const std::vector<typename SharedPtr<V>::Type>& QUESO::GPMSAEmulator< V, M >::m_simulationScenarios

Definition at line 94 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
const ConcatenatedVectorRV<V, M>& QUESO::GPMSAEmulator< V, M >::m_totalPrior

Definition at line 112 of file GPMSA.h.

template<class V = GslVector, class M = GslMatrix>
unsigned int QUESO::GPMSAEmulator< V, M >::num_svd_terms

Definition at line 110 of file GPMSA.h.

Referenced by QUESO::GPMSAEmulator< V, M >::GPMSAEmulator().

template<class V = GslVector, class M = GslMatrix>
const V& QUESO::GPMSAEmulator< V, M >::residual

Definition at line 117 of file GPMSA.h.


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

Generated on Tue Jun 5 2018 19:49:15 for queso-0.57.1 by  doxygen 1.8.5