This project aims to predict the future demand for fuel (in litres) at various fuel stations in Nigeria. By accurately forecasting fuel demand, businesses can optimize their inventory, reduce waste & ensure a steady supply of fuel to customers. It involves using historical data, such as fuel prices, weather conditions, vehicle counts, & past demand
# Fuel Demand Forecasting and Scarcity Planning for Nigeria
## Project Overview
This project addresses the critical need for **Fuel Demand Forecasting** and **Scarcity Planning** in Nigeria. By leveraging machine learning models, we aim to accurately predict future fuel demand in litres at various fuel stations and to identify potential instances of fuel scarcity. This proactive approach enables more efficient resource allocation, optimized inventory management, and strategic planning to ensure consistent fuel availability across the nation, thereby mitigating potential crises.
## Key Stages
1. **Data Preparation & Exploration (EDA):**
* Gathering and cleaning historical data from the provided CSV file.
* Performing Exploratory Data Analysis (EDA) to understand data distributions, identify correlations, and check for missing values.
* Engineering new features from existing data (e.g., date components).
* Splitting the dataset into training and testing sets for model development and evaluation.
2. **Preprocessing Pipelines:**
* Developing robust preprocessing pipelines using `sklearn.ColumnTransformer`.
* Handling numerical features through imputation (`SimpleImputer`) and scaling (`StandardScaler`).
* Encoding categorical features using `OneHotEncoder` to prepare them for machine learning models.
3. **Model Development:**
* Implementing and training two regression models: **Linear Regression** and **Random Forest Regressor**.
* Utilizing `sklearn.pipeline.Pipeline` to streamline the preprocessing and model training workflow.
4. **Model Evaluation:**
* Evaluating model performance using key regression metrics: Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and R² Score.
* Visualizing actual vs. predicted values and residual distributions to assess model fit and identify potential biases.
* Analyzing **Feature Importance** for the Random Forest model to understand the most influential factors driv …