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.
The dataset used is named city_day.csv, which contains daily air quality data, including levels of various pollutants and the corresponding AQI values.
- Data Preprocessing: Comprehensive data cleaning, including handling missing values and median imputation for numerical columns.
- Feature Importance Analysis: Utilizes RandomForestClassifier to visualize the significance of different features in predicting AQI.
- 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.
- Stratified Sampling: Ensures a balanced representation of AQI buckets in training, validation, and test datasets.
- Initial Data Analytics: Initial_Data_Analytics_Air-Quality.py
- Refactored Data Analytics: Data-Analytics_Air-Quality_Refactored.py
- Fine-tuned Data Analytics: Data-Analytics_Air-Quality_Fine-tuned.py
- XGBoost Revision: XGBoost
- Stratification Revision: Stratification
To run the analysis, clone the repository, ensure you have the required libraries installed, and execute the desired .py
file.