Skip to content

ahhyoushh/AQI-Predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

☢️ Air Quality Index (AQI) Prediction Using Random Forest Regressor

🧠 Overview

This project aims to predict the next day’s Air Quality Index (AQI) using historical pollutant measurements. The dataset contains hourly readings of pollutants such as CO, NH₃, NO₂, O₃, PM10, PM2.5, and SO₂, which are aggregated into daily averages for modeling.

I have also made a page about this project AQI Prediction model

A Random Forest Regressor is used to capture the nonlinear relationships between pollutant levels and AQI. Features include both pollutant concentrations and temporal attributes such as month and weekday.


💡 Motivation

With Diwali approaching, I wanted to observe how AQI levels deviate during the festival period — since air quality typically worsens significantly due to fireworks and increased emissions.


📊 Model Performance

✅ Pre-Festival (Seen Data)

Predictions before Diwali were highly accurate, as shown by standard regression metrics:

  • MAE, MSE, and scores indicated solid performance, with R² ≈ 0.86 on seen data.

Score Results:

Model Score Screenshot

Predicted vs Actual Graph:

Predicted vs Actual Graph

⚠️ Festival Period (Unseen Data)

Predictions during Diwali were less consistent, often off by 20–25 AQI points. This drop in performance occurred because Diwali arrived earlier than usual, and the month/weekday features couldn’t effectively capture the sudden festival-related changes in emissions.


💢 Stress Test (Removing pervious day AQI feature)

In the feature importance graph we could see that AQI was the most important feature. Stress test was done to see models perfomance without this important data.

With AQI Feature

image

Without AQI Feature

image

🧩 Summary

  • Model: Random Forest Regressor
  • Data: Daily averages of major air pollutants
  • Goal: Next-day AQI prediction
  • Result: Strong general accuracy (R² ≈ 0.86) on seen data, reduced accuracy during unmodeled festival events

About

Air Quality Index (AQI) Prediction Using Random Forest Regressor(Sci-kit)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors