timeseers icon indicating copy to clipboard operation
timeseers copied to clipboard

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

Open MBrouns opened this issue 5 years ago • 2 comments

MBrouns avatar Jan 23 '20 15:01 MBrouns

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

kori73 avatar Jan 24 '21 08:01 kori73

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.

MBrouns avatar Jan 25 '21 07:01 MBrouns