CausalPy
CausalPy copied to clipboard
replace PyMC linear model with Bambi model
We are not removing custom PyMC models. It makes a lot of sense to be able to write custom PyMC models, for maximum flexibility.
But for the majority of cases, a linear model will be used. Because of this, it doesn't make sense to duplicate all the work that Bambi does in terms of specifying custom priors and handling hierarchical model formulae.
So need to figure out how to use Bambi models ~instead~ in addition.
-
To fit with the
scikit-learn
API we need to be able to pass in a blank model object, so the creation of that will have to happen behind the scenes. So maybe we have aPymcModel
class as a wrapper around a Bambi model. -
A better idea would be to have
ModelBuilder
subclass the Bambi model class, notpm.Model
.