# mlforecast

Iva Eftimska

09/26/2023, 2:48 PM
Can someone explain to me, what exactly forecast_fitted_values do? If I put inside fit function max_horizon lets say 864 (that is 3 days) , does that mean that forecast_fitted_values will return "predictions" for the train data, actually the whole train data returned by the fitted Regressor(not the real train data) + max_horizon (the next 3 days). Is it this same with predict function, where you just put the horizon and then get predictions starting from the end of the train data + the horizon? Then why in documentation it is written that you should run first forecast_fitted_values and then predict to compute predictions? Runnin just forecast_fitted_values, with previously fit (with argument max_horizon) is actually the same with fitting the data without the max_horizon and then just use predict to predict the values?

José Morales

09/26/2023, 4:12 PM
The forecast_fitted_values returns the predictions for the training set exclusively (never into the future). If you use max_horizon=4 for example, then you have 4 models, so each of those 4 models has a slightly different training set (due to targets being offset) and when you compute the fitted values then you get a dataframe with an
column which denotes the horizon that model was fit to (1, 2, 3, or 4) in this case.