https://github.com/nixtla logo
#mlforecast
Title
# mlforecast
f

Francisco

10/11/2023, 7:37 PM
I have one question. Why when doing cross validation for Mlforecast it dosnt take a step size as an argument like the statsforecast library does? how is this prameter defined then? can someone please explain this ?
j

José Morales

10/11/2023, 7:57 PM
It does take a step size, which version are you using?
f

Francisco

10/11/2023, 8:15 PM
on MLforecast it dosnt, this is from the oficial page Perform time series cross-validation Once the
MLForecast
object has been instantiated, we can use the
cross_validation
method, which takes the following arguments: • `df`: training data frame with
MLForecast
format •
h
(int): represents the h steps into the future that will be forecasted •
n_windows
(int): number of windows used for cross-validation, meaning the number of forecasting processes in the past you want to evaluate. • `id_col`: identifies each time series. • `time_col`: indetifies the temporal column of the time series. • `target_col`: identifies the column to model. For this particular example, we’ll use 3 windows of 24 hours.
Copy code
crossvalidation_df = mlf.cross_validation(
    df=Y_df,
    h=24,
    n_windows=3,
)
The crossvaldation_df object is a new data frame that includes the following columns: • `unique_id`: identifies each time series. • `ds`: datestamp or temporal index. • `cutoff`: the last datestamp or temporal index for the
n_windows
. • `y`: true value • `"model"`: columns with the model’s name and fitted value.
j

José Morales

10/11/2023, 8:17 PM
Hmm. That's outdated, please see the API reference instead or if you're in a jupyter notebook you can use
MLForecast.cross_validation?
f

Francisco

10/11/2023, 8:19 PM
Ah I see, It does take step size. Thank you
Seems like the ´page iw as looking wasnt updated
j

José Morales

10/11/2023, 9:13 PM
Yes, sorry about that. I'm going to update that to point to the API reference instead (that gets updated automatically)