Hello , I am trying to find R2 score on the training dataset , but it is giving me this error.
ValueError: Provided exogenous values are not of the appropriate shape. Required (1, 6), got (42, 6).
my code -
model = SARIMAX(endog = y_train, exog = x_train, order = order, seasonal_order = seasonal_order)
s_results = model.fit()
Generate forecasts for the training data
exog_forecast = x_train # Provide exogenous variables for future periods
forecast = s_results.predict(start=1, end=42, exog = exog_forecast)
note
x_train.shape , x_test.shape , y_train.shape , y_test.shape --> ((42, 6), (6, 6), (42,), (6,))
thank you in advance.