2
$\begingroup$

I am working on predicting half-hourly UK electricity prices with prophet. I have two other time series: gas prices and initial national demand out-turn. So, after merging all the data-sets together based on datetime index, I used gas prices and initial national demand as regressors.

When I use only gas as regressor, I get better prediction results. However, If I add load demand, the model gives worse results. I am a bit confused cuz both regressors are positively correlated and have impact on electricity prices.

Also, one important detail is that the load demand has very clear pattern compared to electricity and gas prices series. So, from the prediction graph, it seems like prophet model is following that pattern that is easier to follow, which in this case is load demand. Anyhow, I might be wrong somewhere.

Some of the code:

#Prophet:
model_P = Prophet(weekly_seasonality=True,yearly_seasonality=False, daily_seasonality=True)
model_P.add_seasonality(name="monthly", period=30.5, fourier_order=5)
model_P.add_regressor('Gas')
model_P.add_regressor('INDO')
model_P.fit(pd.DataFrame({'ds': train.index, 'y':train, 'Gas': train_gas, 'INDO': train_indo}))

def populate_indo_val(dt):
current_date=str(dt.date())
return df[current_date]['INDO'][0]

def populate_gas_val(dt):
current_date=str(dt.date())
return df[current_date]['Gas'][0]

future_dates = model_P.make_future_dataframe(periods=test.shape[0],freq='30T')
future_dates['INDO']=future_dates['ds'].apply(populate_indo_val)
future_dates['Gas']=future_dates['ds'].apply(populate_gas_val)
results_P = model_P.predict(future_dates)
forecast_P = results_P.set_index('ds').yhat

I am also attaching the forecasting model graphs. When only gas is used as regressor and the second graph that depicts the model where only initial load demand is used for prediction.enter image description here

$\endgroup$
  • $\begingroup$ Can we see the results of Prophet's cross-validation for the two different models? $\endgroup$ – Dan Scally Sep 6 '19 at 7:56
  • $\begingroup$ The results of the electricity price prediction model with gas as regressor are: MAE: 7.5067538088 MAPE:37.7399931 MSE:157.465419 RMSE:12.54852259. The results of the model with Initial load demand: MAE Error: 10.779535286398428 MAPE Error: 37.43419088431484 MSE Error: 266.2236495 RMSE Error: 16.3163614 $\endgroup$ – Vjosa Preniqi Sep 6 '19 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.