CommencerCommencez gratuitement

Training models with backtesting

Building on the previous exercises, you'll now evaluate your models using backtesting. You'll define 4 partitions, each with a 12-hour shift and a 72-hour testing window, and execute the process with the cross_validation() method.

The ts DataFrame and initialized MLForecast object (mlf) are preloaded, so you can focus on setting up and running the backtesting. Let's get started!

Cet exercice fait partie du cours

<cours>Designing Forecasting Pipelines for Production</cours>
Voir le cours

Exercice interactif pratique

Essayez cet exercice en complétant ce code d’exemple.

# Import a library for interval calibration
from mlforecast.utils import ____

# Set parameters
h = ____  
step_size = ____  
partitions = 4  
n_windows = 3  
method = "conformal_distribution"  
levels = [95] 

# Initialize PredictionIntervals
pi = ____(h=____, n_windows=____, method=____)
Modifier et exécuter le code