Skip to content

Commit

Permalink
Revert "RWMH: Check proposal contains zero with enough margin"
Browse files Browse the repository at this point in the history
This reverts commit 52c9554.
This check was not included by design in the MCMC overhaul
because it creates problems in higher dimensions
and fails to actually block senseless proposal distributions.
  • Loading branch information
josephmure authored and jschueller committed Sep 18, 2024
1 parent 3292929 commit 0d7c483
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/src/Uncertainty/Bayesian/RandomWalkMetropolisHastings.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,6 @@ void RandomWalkMetropolisHastings::setProposal(const Distribution & proposal)
if (proposal.getDimension() != marginalIndices_.getSize())
throw InvalidArgumentException(HERE) << "The proposal density dimension (" << proposal.getDimension()
<< ") does not match the block size (" << marginalIndices_.getSize() << ")";

// check the range contains the origin with enough probability
const Scalar cdf0 = proposal.computeCDF(Point(proposal.getDimension()));
const Scalar qMin = ResourceMap::GetAsScalar("Distribution-QMin");
const Scalar qMax = ResourceMap::GetAsScalar("Distribution-QMax");
if (!((cdf0 > qMin) && (cdf0 < qMax)))
throw InvalidArgumentException(HERE) << "The range of the proposal distribution does not contain the origin with enough probability";

proposal_ = proposal;

// In the following, we try do determine whether the proposal distribution is symmetric.
Expand Down

0 comments on commit 0d7c483

Please sign in to comment.