https://mooseframework.inl.gov
IndependentMHDecision.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "PMCMCDecision.h"
13 #include "IndependentGaussianMH.h"
15 
20 {
21 public:
23 
25 
26 protected:
27  virtual void computeEvidence(std::vector<Real> & evidence,
28  const DenseMatrix<Real> & input_matrix) override;
29 
30  virtual void computeTransitionVector(std::vector<Real> & tv,
31  const std::vector<Real> & evidence) override;
32 
33  virtual void nextSamples(std::vector<Real> & req_inputs,
34  DenseMatrix<Real> & input_matrix,
35  const std::vector<Real> & tv,
36  const unsigned int & parallel_index) override;
37 
38  virtual void nextSeeds() override;
39 
40 private:
43 
45  std::vector<Real> & _seed_input;
46 
48  std::vector<Real> _seed_outputs;
49 
51  std::vector<Real> _tpm_modified;
52 
54  std::vector<Real> _outputs_sto;
55 };
PMCMCDecision will help making sample accept/reject decisions in MCMC schemes (for e...
Definition: PMCMCDecision.h:22
virtual void computeEvidence(std::vector< Real > &evidence, const DenseMatrix< Real > &input_matrix) override
Compute the evidence (aka, betterness of the proposed sample vs the previous)
const IndependentGaussianMH *const _igmh
IndependentGaussianMH sampler.
virtual void nextSeeds() override
Compute the next set of seeds to facilitate proposals.
std::vector< Real > _tpm_modified
Modified transition vector considering the seed input.
virtual void nextSamples(std::vector< Real > &req_inputs, DenseMatrix< Real > &input_matrix, const std::vector< Real > &tv, const unsigned int &parallel_index) override
Resample inputs given the transition vector (after transition vector computed)
std::vector< Real > & _seed_input
Seed vector input for proposing new samples.
IndependentMHDecision(const InputParameters &parameters)
std::vector< Real > _outputs_sto
Store the gathered outputs.
const InputParameters & parameters() const
virtual void computeTransitionVector(std::vector< Real > &tv, const std::vector< Real > &evidence) override
Compute the transition probability vector (after the computation of evidence)
A class for performing independent Metropolis-Hastings MCMC decision making.
A class for performing M-H MCMC sampling with independent Gaussian propoposals.
static InputParameters validParams()
std::vector< Real > _seed_outputs
Outputs corresponding to the seed input vector.