https://github.com/nixtla logo
#general
Title
# general
p

Piotr Pomorski

03/13/2023, 11:46 AM
Hi, how do I reuse the model for new data? So literally storing the fitted and optimised model and using predict for some new observations (I see the new_data argument in .predict but I need a fitted model first).
f

fede (nixtla) (they/them)

03/13/2023, 6:33 PM
hey @Piotr Pomorski! Thanks for asking. What library are you referring to? :)
p

Piotr Pomorski

03/13/2023, 9:45 PM
ah right, mlforecast
f

fede (nixtla) (they/them)

03/15/2023, 10:40 PM
hey @Piotr Pomorski! Currently, mlforecast doesn’t have a custom save and load behavior. Maybe you could try storing the fitted mlforecast class using pickle and after that call
predict
with
new_data
.
m

Max (Nixtla)

03/17/2023, 6:39 PM
@Piotr Pomorski, if you need that, we are happy to work on that. Would you mind opening a request on our Github?
(BTW: thanks for your posts on Twitter)
p

Piotr Pomorski

03/18/2023, 12:18 PM
I actually just reused the optimised parameters and tested the performance by refitting the model with the same (optimised) parameters. However, I stumbled upon one problem with this. The PredictionIntervals seem to be recalibrating as well which I don't want to do on the test set. Is there a way to move them from training to test somehow? Or abandoning them completely and just using levels in predict as another hyperparameter would do?
No problem, thanks for reading my tweets haha (if you are not following me yet, I cordially invite to do so!)
3 Views