1
$\begingroup$

I am studying time series right now. So, I have this dataset. My aim is temperature prediction.

I've found out that ARIMA can't work with long period seasonality. So, I've resampled daily dataset into weekly. Than I create an ARIMA with S = 52 and fit it. Here is a code (python):

import statsmodels.api as sm
import pandas as pd

df = pd.read_csv('data/DailyDelhiClimateTrain.csv', parse_dates=['date'], index_col='date')
df = df.resample('W').mean()

model=sm.tsa.statespace.SARIMAX(
    df.meantemp, 
    order=(1, 1, 1),
    seasonal_order=(2, 1, 0, 52)
).fit()

And here is the prediction and the test data (blue - test data, red - predictions):

Test and prediction plot

As you see, the MSE is 6.08.

Later, I decided to use daily format with S = 365.25. I didn't find solution in python, but I found a fourier approximation in R. So, here my daily model (R):

require(forecast)
require(data.table)

train <- read.csv("data/DailyDelhiClimateTrain.csv")
y_train = ts(train[, 2], freq=365.25)

fit <- auto.arima(y_train, seasonal=FALSE, xreg=fourier(y_train, K=15))

And for some reason this works much worse: Test and prediction plot

I'm really sorry for such long introduction. My question is: why daily prediction works much worse than weekly?

$\endgroup$
0
$\begingroup$

I have examined your 2 data sets ... DAILY and WEEKLY and found that your model specification for DAILY is WAYOVERCOMPLICATED while your automatic arima approach was inadequate/deficient. Both data sets benefit from having level/step shifts and anomaliesenter image description here empirically identified with model enter image description here

The Weekly series is here enter image description here with modelenter image description here

IN general the results are VERY SIMILAR insofar as memory (arima structure) is omitted as it was found unnecessary to adequately characterize the series being analyzed.

$\endgroup$
2
  • $\begingroup$ I'm not sure, but looks like the models you showed were fitted on test dataset. Perhaps I didn't make myself clear. I fit my models on Train.csv and both screenshots in my question - are models' evaluation on Test.csv. $\endgroup$
    – Yoskutik
    May 4 '20 at 12:55
  • $\begingroup$ I had a big problem trying to read and use your data. If you want me to continue .. please email me at dareilly55@comcast.net the 2 xls/csv files without # and date . Tell me how many periods out u want to forecast. I will do so and u can evaluate $\endgroup$
    – IrishStat
    May 4 '20 at 14:30

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.