I am trying my best to understand how backend of pymc3 works.
In this process I have created a comparison of a log-likelihood function of an array of observed values based on both scipy stats logpdf and pymc3 logp functions. The methodology is based on @junpenglao 's notebook “Code 3 - Combining_Likelihood.ipynb” in his course “advanced baysesian modelling with pymc3”.
I have attached the complete file below.
If setting the parameter b sufficiently high, for example b=5e13 or higher, the log likelihood function plot of the scipy stats logpdf implementation seems to create one unique solution as expected, checked by finding peaks in the plot (is this a valid approach?), while the pymc3 logp functions log likelihood plot is very “weird” with multiple peaks. Is a numerical issue, or am i doing something wrong here? I would assume the floating point effects of the b parameter being very large should have been handled by the auto-transformation of my uniform priors to alpha_interval__.
Above is plot of peaks in log-likelihood function of pymc3 model based on the models logp function.
Any help is extremely welcome
BR
log_likelihood_demo.py (5.0 KB)