Last active
November 7, 2021 17:06
-
-
Save PDiracDelta/d6aa8348aa917f1885a58c3db051b130 to your computer and use it in GitHub Desktop.
Python3 use fmin_l_bfgs_b to get MLE of Negative Binomial for binned data.
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
optimized_result = fmin_l_bfgs_b(log_likelihood_binned, | |
x0=initial_params, | |
# fprime=log_likelihood_deriv, | |
args=(X,), | |
approx_grad=True, | |
bounds=bounds) | |
MLE_params = {'size': optimized_result[0][0], 'prob': optimized_result[0][1]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment