read these links carefully and learn from them, first one( https://nixtlaverse.nixtla.io/statsforecast/docs/getting-started/getting_started_complete_polars.html#introducing-polars-a-high-performance-dataframe-library), second one (https://nixtlaverse.nixtla.io/statsforecast/src/core/models.html), third one( https://nixtlaverse.nixtla.io/statsforecast/docs/tutorials/crossvalidation.html), fourth one( https://nixtlaverse.nixtla.io/statsforecast/docs/models/autoarima.html#splitting), fifth one ( https://nixtlaverse.nixtla.io/statsforecast/src/arima.html), sixth one ( https://nixtlaverse.nixtla.io/statsforecast/docs/tutorials/crossvalidation.html), seventh one ( https://nixtlaverse.nixtla.io/statsforecast/src/core/core.html) , now look at my code to see the the model was correctly implemented? from statsforecast import StatsForecast
from statsforecast.models import AutoARIMA
from statsforecast.utils import ConformalIntervals
import numpy as np
import polars as pl

# Polars option to display all rows
pl.Config.set_tbl_rows(None)

# Initialize the StatsForecast model
sf = StatsForecast([AutoARIMA(d=None, D=0, max_d=1, max_p=3, max_q=3, max_P=3, max_Q=1, start_p=0, start_q=0, start_P=0, start_Q=0, stepwise=True, trace=False, seasonal=True, season_length=52)], freq='1w', n_jobs=-1)

# Perform cross-validation with a step size of 1 to mimic an expanding window
crossvalidation_df = sf.cross_validation(df=y_cl4, h=16, step_size=1, n_windows=18, sort_df=True)

def wmape(y_true, y_pred):
    return np.abs(y_true - y_pred).sum() / np.abs(y_true).sum()

# Calculate the WMAPE
wmape_value = wmape(crossvalidation_df['y'], crossvalidation_df['AutoARIMA'])
print('Average WMAPE: ', round(wmape_value, 4))

# Calculate the errors
errors = crossvalidation_df['y'] - crossvalidation_df['AutoARIMA']

# For an individual forecast
individual_accuracy = 1 - (abs(crossvalidation_df['y'] - crossvalidation_df['AutoARIMA']) / crossvalidation_df['y'])
individual_bias = (crossvalidation_df['AutoARIMA'] / crossvalidation_df['y']) - 1

# Add these calculations as new columns to your DataFrame
crossvalidation_df = crossvalidation_df.with_columns([
    individual_accuracy.alias("individual_accuracy"),
    individual_bias.alias("individual_bias")
])

# Print the individual accuracy and bias for each week
for row in crossvalidation_df.to_dicts():
    id = row['unique_id']
    date = row['ds'] 
    accuracy = row['individual_accuracy']
    bias = row['individual_bias']
    print(f"{id}, {date}, Individual Accuracy: {accuracy:.4f}, Individual Bias: {bias:.4f}")

# For groups of forecasts
group_accuracy = 1 - (errors.abs().sum() / crossvalidation_df['y'].sum())
group_bias = (crossvalidation_df['AutoARIMA'].sum() / crossvalidation_df['y'].sum()) - 1

# Print the average group accuracy and group bias over all folds
print('Average Group Accuracy: ', round(group_accuracy, 4))
print('Average Group Bias: ', round(group_bias, 4))

# Fit the model on the entire dataset
sf.fit(y_cl4)

# Instantiate the ConformalIntervals class
prediction_intervals = ConformalIntervals()

# Generate 24 months forecasts
forecasts_df = sf.forecast(h=4*24, prediction_intervals=prediction_intervals, level=[95], id_col='unique_id', sort_df=True)

forecasts_df = forecasts_df.with_columns([
    pl.col("AutoARIMA").round().alias("AutoARIMA"),
    pl.col("AutoARIMA-lo-95").round().alias("AutoARIMA-lo-95"),
    pl.col("AutoARIMA-hi-95").round().alias("AutoARIMA-hi-95")
])

# Create an empty list
forecasts_list = []

# Append each row to the list
for row in forecasts_df.to_dicts():
    forecasts_list.append(row)

# Print the list
for forecast in forecasts_list:
    print(forecast)