PYMC3 regression

I posted an IPython notebook here http://nbviewer.ipython.org/gist/dartdog/9008026

And I worked with both the standard Statsmodels OLS models and PYMC3 with the data provided through Pandas, this part works fine, by the way.

I don’t see how to get more standard parameters from PYMC3? The examples seem to simply use OLS to build a regression baseline. It seems that the data of the PYMC3 model should be able to give parameters for the regression line? in addition to likely traces, i.e. What is the highest probability line?

Any further explanation for interpreting Alpha, beta and sigma is welcome!

Also, how to use the PYMC3 model to estimate the future value of y with a new forecast x ie with some probability?

And finally, PYMC3 has a new GLM shell that I tried and it seems to mess up? (it could be me though)

+4
source share
1 answer

The glm submodule sets some default priorities, which may not be very suitable for every case in which yours is one. You can change them using a family argument, for example:

pm.glm.glm('y ~ x', data,
           family=pm.glm.families.Normal(priors={'sd': ('sigma', pm.Uniform.dist(0, 12000))}))

Unfortunately, this is still not very well documented and requires good examples.

+6
source

Source: https://habr.com/ru/post/1527019/


All Articles