Can you predict airline delays for Tunisian aviation company, Tunisair?
# Forecasting-Flight_Delay
Can you predict airline delays for Tunisian aviation company, Tunisair?
This project follows a complete data science workflow:
data preparation โ exploratory analysis โ modeling โ evaluation โ forecasting and comparison.
1. ๐๐๐ญ๐ ๐๐จ๐๐๐ข๐ง๐ ๐๐ง๐ ๐๐ซ๐๐ฉ๐๐ซ๐๐ญ๐ข๐จ๐ง
* Importing required libraries (Pandas, NumPy, Matplotlib, Statsmodels, Scikit-learn, etc.).
* Loading the flight delay dataset.
* Cleaning the data and converting date columns to datetime format.
* Sorting the data chronologically to preserve the time order.
2. ๐๐๐ญ๐ ๐๐ ๐ ๐ซ๐๐ ๐๐ญ๐ข๐จ๐ง ๐๐ง๐ ๐๐ซ๐๐ง๐ฌ๐๐จ๐ซ๐ฆ๐๐ญ๐ข๐จ๐ง
* Aggregating the data by day to build a time series.
* Computing indicators such as daily average flight delay.
* Checking the consistency and size of the time series.
3. ๐๐ฑ๐ฉ๐ฅ๐จ๐ซ๐๐ญ๐จ๐ซ๐ฒ ๐๐๐ญ๐ ๐๐ง๐๐ฅ๐ฒ๐ฌ๐ข๐ฌ (๐๐๐)
* Visualizing the evolution of average delays over time.
* Analyzing the distribution of delays.
* Identifying trends and seasonal patterns (especially weekly seasonality).
4. ๐๐๐ญ๐ ๐๐ซ๐๐ฉ๐๐ซ๐๐ญ๐ข๐จ๐ง ๐๐จ๐ซ ๐๐จ๐๐๐ฅ๐ข๐ง๐
* Splitting the dataset into training and testing sets.
* Scaling/normalizing the data for models that require it (e.g., LSTM).
5. ๐๐จ๐๐๐ฅ๐ข๐ง๐ ๐๐ง๐ ๐
๐จ๐ซ๐๐๐๐ฌ๐ญ๐ข๐ง๐
Several forecasting models were implemented and compared:
* ARIMA
* Baseline time series model.
* ACF/PACF analysis to select parameters.
* SARIMA
* Extension of ARIMA including weekly seasonality (7 days).
* LSTM (Long Short-Term Memory)
* Prophet
* XGBoost
6. ๐๐จ๐๐๐ฅ ๐๐ฏ๐๐ฅ๐ฎ๐๐ญ๐ข๐จ๐ง
* Comparing model performance using error metrics (e.g., RMSE, MAE).
* Visual comparison of actual vs predicted values.
7. ๐
๐ข๐ง๐๐ฅ ๐
๐จ๐ซ๐๐๐๐ฌ๐ญ๐ข๐ง๐
Using the trained models to forecast flight delays for the year 2019.
8. ๐๐จ๐ฆ๐ฉ๐๐ซ๐ข๐ฌ๐จ๐ง ๐๐ง๐ ๐๐จ๐ง๐๐ฅ๐ฎ๐ฌ๐ข๐จ๐ง
* Global comparison of all tested models.
* Identification of the most accurate and suitable forecasting approach.