Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept -max over -infinity #182

Open
bangerth opened this issue Feb 14, 2022 · 1 comment
Open

Accept -max over -infinity #182

bangerth opened this issue Feb 14, 2022 · 1 comment

Comments

@bangerth
Copy link
Owner

-max() might be zero probability, but it's still better than -infinity(). Accept samples if that happens. See

          const bool trial_sample_has_zero_probability
            = ((trial_log_likelihood == -std::numeric_limits<double>::max())
               ||
               (trial_log_likelihood == -std::numeric_limits<double>::infinity()));
          const bool current_sample_has_zero_probability
            = ((current_log_likelihood == -std::numeric_limits<double>::max())
               ||
               (current_log_likelihood == -std::numeric_limits<double>::infinity()));

          bool repeated_sample;
          if (!(trial_sample_has_zero_probability && !current_sample_has_zero_probability)

@dklong-csu -- FYI

@bangerth
Copy link
Owner Author

Also correspondingly update the documentation. This has to happen in all of the sampling algorithms we have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant