How to model non-informative priors in PyMC3

Its a bit confusing,
Task–> i want to model “Non-informative priors”

Should i use pm.Flat or pm.Uniform
Which one is correct (both in mathematical sense and implementation)

#considering priors as Uniform

mu = pm.Uniform(‘mu’, lower = some value , upper= some value )
beta=pm.Uniform(‘beta’, lower = some value , upper= some value )

#considering prior as Flat

mu = pm.Flat('mu')
beta=pm.Flat('beta')

# Define the likelihood function.
y_obs = pm.Gumbel('y_obs', mu=mu, beta=beta, observed=annual_maxima_1)

Best regards

As far as I can tell, the probability density of Uniform is 1/width, making the integral one. Flat returns 0 for the log probability density. If you’re after a proper probability density (for a continuous probability density function), I’d opt for Uniform.

But I might have missed an important detail…

1 Like