Probabilistic forecasting with DeepAR
This time, we’ll turn our attention to DeepAR
, a state-of-the-art method for probabilistic forecasting. We’ll also leverage the neuralforecast
framework to exemplify how to apply DeepAR
for this task.
Getting ready
We’ll continue with the same dataset that we used in the previous recipe.
Since we are using a different Python package, we need to change our preprocessing steps to get the data into a suitable format. Now, each row corresponds to a single observation at a given time for a specific time series. This is similar to what we did in the Prediction intervals using conformal prediction recipe:
def load_and_prepare_data(file_path, time_column, series_column, aggregation_freq): """Load the time series data and prepare it for modeling.""" dataset = pd.read_csv(file_path, parse_dates=[time_column]) ...