What are the returned values of find_MAP in pymc3 ?
It seems that pymc3.Normal and pymc3.Uniform variables are not considered the same: for pymc3.Normal variables, find_MAP returns a value that looks like the maximum a posteriori probability. But for pymc3.Uniform variables, I get a '_interval' suffix added to the name of the variable and I don't find anywhere in the doc the meaning of the returned value (that may seem absurd, not even within the physical limits).
For example:
import numpy as np
import pymc3 as pm3
# create basic data such as obs = (x*0.95)**2+1.1+noise
x=np.arange(10)+1
obs=(x*0.95)**2+np.random.randn(10)+1.1
# fitting the model y=a(1*x)**2+a0 on data points
with pm3.Model() as model:
a0 = pm3.Uniform("a0",0,5)
a1 = pm3.Normal("a1",mu=1,sd=1)
a2 = pm3.Deterministic('a2',(x*a1)**2+a0)
hypothesis = pm3.Normal('hypothesis', mu=a2, sd=0.1, observed=obs)
start = pm3.find_MAP()
print('start: ',start)
returns:
Optimization terminated successfully.
Current function value: 570.382509
Iterations: 13
Function evaluations: 17
Gradient evaluations: 17
start: {'a1': array(0.9461006484031161), 'a0_interval_': array(-1.0812715249577414)}