Hi team, I have a straightforward use case where I...
# timegpt
p
Hi team, I have a straightforward use case where I have about 2 years of time series data and need to predict future values at regular intervals. I plan to make periodic API calls to Nixtla for these forecasts. I have a few questions: 1. Could you advise on the best design for this scenario? I aim to pretrain the model before making API calls, and this process needs to be automated, not manual. 2. Is it possible to save a pre-trained model? I noticed in the documentation that TimeGPT does not currently support saving model parameters. Does this mean I need to retrain the model with every forecast API call if I want to fine-tune? 3. Can someone provide guidance on best practices for this design?
m
Hello! For your first question, you can setup a CRON job that runs a Python script according to your desired schedule. I don't know your technical stack and setup, but that's one way of automating the execution of a script. For your second question, I guess you mean fine-tuning the model. At this moment, you have to specify fine-tuning parameters such as
finetune_steps
and optionally
finetune_loss
every time you call the
forecast
method. Finally, make sure to monitor the performance of the model as new data is added. Maybe you will have to increase or decrease the number of
finetune_steps
, but those are experiments you need to run on your end. I hope this helps!
p
@Marco Thank you so much for the quick response, yes it was helpful! I have a couple of follow up questions 😅 How should I handle missing data in my time series? I have financial data (transactional/balances) and no data for weekends and bank holidays because no transactions take place, and the balances remain the same. What's the best approach? Options: 1. Fill the balance with the previous day's value (Friday) for both Saturday and Sunday and set the transactions amount to 0. 2. Adjust the dates so there are no gaps by pushing the data back (although this seems less optimal, would TimeGPT perform better with continuous data?). For example, if I have data for 1-5 Oct (Mon-Fri) and 8-13 Oct, I can adjust it to 1-11 Oct.
m
We have a tutorial covering use cases with irregular timestamps. In fact, it covers your exact scenario! Here, simply set
freq='B'
. This stands for business days, so it will ignore weekends. As for the holidays, I assume they occur on national holidays. You can add those holidays to TimeGPT automatically (see this tutorial). Simply use the right country. You can also specify your own dates if necessary. I hope this helps!