luke14free / pm-prophet

GAM timeseries modeling with auto-changepoint detection. Inspired by Facebook Prophet and implemented in PyMC3
325 stars 42 forks source link

additive_seasonality *= self.data.y.max() #10

Closed dsvolk closed 5 years ago

dsvolk commented 5 years ago

I've been reading through the code and I met this line at model.py, line 293: additive_seasonality *= self.data.y.max() and in a few other places around the code. Could anyone comment on its exact purpose?

This seems to me to be related to data standartisation, but data standartisation is also done later, in the model specification: observed=(self.data['y'] - self.data['y'].mean()) / self.data['y'].std()

At the very least, shouldn't it be additive_seasonality *= self.data.y.abs().max() to account for the possiblity that, say, range of y is [-1,0] and thus y.max()==0 ?

luke14free commented 5 years ago

Fair point. thanks for noticing

dsvolk commented 5 years ago

You're welcome :)