'PyMC3 fitting quadratic line to data
How do you choose quadratic model parameters? This is what I've got so far .. with pm.Model() as quad_model: #I'd like to add sigmas (and mu if that's reasonable) but I'm not sure how to decide how big to go..
a = pm.Normal('a')
b = pm.Normal('b')
c = pm.Normal('c')
sigma = pm.HalfNormal('scatter', sd=sigm_y)
#this .MutableData I'm not sure I'm using correct, I'm following an #example but my data is position not dates/time
t = pm.MutableData('t', bp_rp, dims='obs_time')
mu = a*t**2 + b*t + c
obs = pm.Normal('mg', mu=mu, sd=sigma, observed=mg, dims='obs_time')#, dims='obs_time'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|