historical_expenditures
table is used to make batch predictions. Upon joining the quarterly_expenditure_forecaster
model with the historical_expenditures
table, we get predictions for the next quarter as defined by the HORIZON 3
clause.
MindsDB provides the LATEST
keyword that marks the latest training data point. In the WHERE
clause, we specify the month > LATEST
condition to ensure the predictions are made for data after the latest training data point.
If we train the model using data from January 2020 until December 2020 (as defined by WINDOW 12
), then the predictions come for the first quarter of 2021 (as defined by HORIZON 3
).