We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I think the code for computing the entropy of a Gaussian has a small bug:
estimate_normal_entropy <- function(M, sigma) { y <- rnorm(M, 0, sigma) log_p_y <- dnorm(y, 0, sigma, log = TRUE) -sum(log_p_y) }
The last line should be -mean(log_p_y) or -sum(log_p_y)/M.
-mean(log_p_y)
-sum(log_p_y)/M
Also, the simulated values could be contrasted with the closed formula solution:
gauss_entropy <- function(sigma) 0.5*log(2*pi*exp(1)*sigma^2)
Best,
LS
The text was updated successfully, but these errors were encountered:
Thanks! I'll fix it.
Sorry, something went wrong.
No branches or pull requests
I think the code for computing the entropy of a Gaussian has a small bug:
The last line should be
-mean(log_p_y)
or-sum(log_p_y)/M
.Also, the simulated values could be contrasted with the closed formula solution:
Best,
LS
The text was updated successfully, but these errors were encountered: