To develop a robust climate change forecasting model using SARIMAX to predict temperature fluctuations, aiming to improve forecast accuracy by minimizing prediction errors.
Data Preparation and Initial Analysis:
- Extracted temperature data for Rio de Janeiro from the global dataset, focusing on monthly averages from 1900 to 2012.
- Performed exploratory analysis using line plots and pivot tables to visualize both yearly and monthly variations.
- Observed seasonality, with warmer months between November and February and cooler months between July and September.
Trend Analysis:
- Calculated the yearly average temperatures and applied a 10-year moving average to smooth the trend.
- Found an increasing trend in temperature, with the average temperature rising by approximately 4.25% over 100 years.
Stationarity Check:
- Used the Augmented Dickey-Fuller (ADF) test to confirm that the series was stationary after seasonal differencing.
- Plotted ACF and PACF, indicating a seasonal ARIMA model with AR(3) and seasonal SMA(1) components was appropriate.
Modeling:
- Split the data into training (first ~100 years), validation (last 5 years), and test sets (last year).
- Fitted a SARIMA(3,0,0)(0,1,1,12) model and made predictions using walk-forward validation.
- Achieved an RMSE of 0.7874 for the SARIMA model, improving the baseline forecast (previous month's temperature) by over 40%.