This project is a Traffic Predictor model that uses the ARIMA (AutoRegressive Integrated Moving Average) algorithm to forecast future traffic counts for various types of vehicles. The model is designed to predict traffic 30 minutes into the future based on historical data.
- Traffic Prediction: Predicts the number of vehicles on the road for a specified period into the future.
- Custom Prediction: Allows users to predict traffic starting from any specific time index and for a specified number of minutes into the future.
- Data Visualization: Plots the actual vs. predicted traffic data for easy comparison and analysis.
The model uses a time series dataset that records traffic counts for different types of vehicles at various timestamps. The dataset is stored in a CSV file (cars.csv
), which includes a single column with vehicle counts:
plaintext
Copy code
Car 4 2 1 0 3 ...
The CSV file contains a column named Car
with integer values representing the traffic count for each time period.
-
Clone the repository:
bash
Copy code
git clone https://github.com/anirudhpk01/traffic-predictor-arima.git cd traffic-predictor-arima
-
Install dependencies:
bash
Copy code
pip install -r requirements.txt
Ensure
requirements.txt
includes necessary libraries such aspandas
,numpy
,matplotlib
,statsmodels
, andpmdarima
.