https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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"
15
20{
21public:
23
25
26protected:
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
40private:
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};
A class for performing M-H MCMC sampling with independent Gaussian propoposals.
A class for performing independent Metropolis-Hastings MCMC decision making.
static InputParameters validParams()
std::vector< Real > & _seed_input
Seed vector input for proposing new samples.
virtual void nextSeeds() override
Compute the next set of seeds to facilitate proposals.
std::vector< Real > _seed_outputs
Outputs corresponding to the seed input vector.
const IndependentGaussianMH *const _igmh
IndependentGaussianMH sampler.
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)
std::vector< Real > _outputs_sto
Store the gathered outputs.
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)
virtual void computeTransitionVector(std::vector< Real > &tv, const std::vector< Real > &evidence) override
Compute the transition probability vector (after the computation of evidence)
std::vector< Real > _tpm_modified
Modified transition vector considering the seed input.
const InputParameters & parameters() const
PMCMCDecision will help making sample accept/reject decisions in MCMC schemes (for e....