Skip to content

A project that performs Classification to predict the AQI categories of Air Quality Data

License

Notifications You must be signed in to change notification settings

ndemps/air_quality_models

Repository files navigation

Air Quality Data Analytics

This repository focuses on analyzing air quality data to predict the Air Quality Index (AQI) bucket based on various air pollutant levels. The primary objective is to understand the significance of different pollutants in determining air quality and to build predictive models that can accurately classify the AQI bucket.

Dataset

The dataset used is named city_day.csv, which contains daily air quality data, including levels of various pollutants and the corresponding AQI values.

Key Features:

  1. Data Preprocessing: Comprehensive data cleaning, including handling missing values and median imputation for numerical columns.
  2. Feature Importance Analysis: Utilizes RandomForestClassifier to visualize the significance of different features in predicting AQI.
  3. Model Training and Evaluation: Implements RandomForestClassifier and XGBoost Classifier for prediction. Includes hyperparameter tuning for optimization and evaluates model performance on validation and test datasets.
  4. Stratified Sampling: Ensures a balanced representation of AQI buckets in training, validation, and test datasets.

Code Files:

  1. Initial Data Analytics: Initial_Data_Analytics_Air-Quality.py
  2. Refactored Data Analytics: Data-Analytics_Air-Quality_Refactored.py
  3. Fine-tuned Data Analytics: Data-Analytics_Air-Quality_Fine-tuned.py

Fine-tuned Data Analytics - Attempts at Optimizing the RFC Model:

Usage:

To run the analysis, clone the repository, ensure you have the required libraries installed, and execute the desired .py file.

About

A project that performs Classification to predict the AQI categories of Air Quality Data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published