Created
January 30, 2024 15:18
-
-
Save smzn/2bd8715b11c9df9fcf221c8f1aab9a51 to your computer and use it in GitHub Desktop.
MAP推定
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Calculate the mode (MAP estimate) of the posterior gamma distribution | |
if alpha_posterior > 1: | |
lambda_map_estimate = (alpha_posterior - 1) / beta_posterior | |
else: | |
lambda_map_estimate = 0 | |
lambda_map_estimate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment