MBrouns/timeseers

Make parameter values in submodels unique to fix duplicate variable names in traces

Opened this issue · 2 comments

Make parameter values in submodels unique to fix duplicate variable names in traces

Is this resolved with the _param_name method or is there additional work to do?

this is already fixed with the _param_name, yes. I did recently discover though that you can have nested PyMC3 models with namespaces that could also solve this issue. In the definition method, we could do the following:

def definition(self, model, X, y):
    with pm.Model(f'FourierSeasonality({self.n}, {self.p})', model):
         // Do the normal PyMC stuff here 

I'm not sure what the pros and cons to either are yet though.