intive-DataScience / tbats

BATS and TBATS forecasting methods
MIT License
178 stars 19 forks source link

Update method? #35

Closed fkiraly closed 2 years ago

fkiraly commented 2 years ago

Is there a way to update the parameters of the model after ingesting more data? As opposed to refitting it.

If not, would it be possible to implement that? FYI @jelc53

cotterpl commented 2 years ago

The only way currently available is provided as an example here: https://github.com/intive-DataScience/tbats/blob/master/examples/re_fit_model.py It does not change model parameters (does not do full model training), it just adjusts it to latest observation.

What other kind of update do you need? Can you be more specific?

jelc53 commented 2 years ago

This is exactly what I’m after actually. Thank you @fkiraly and @cotterpl

fkiraly commented 2 years ago

Yes, indeed, thanks!

jelc53 commented 2 years ago

@cotterpl Just one follow up. In the example you shared, we just reapply the fit method and it "updates" the states of the model without refitting parameters. How then would you "refit parameters" if you wanted to?

cotterpl commented 2 years ago

In the example first fit is called on a different object than second fit. First fit is on estimator = TBATS() that does full 'training' while second fit is called on fitted_model which is not TBATS class but Model class that has its parameters fixed already. To refit parameters simply create a new TBATS class and fit on it (create a new independent estimator)

jelc53 commented 2 years ago

Perfect, really clear explanation - thank you again