Skip to content

Azam-Ra/air-quality

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Air quality forecast

Train a gradient-boosted tree model that predicts PM2.5 from weather conditions.

Run

Create and activate a virtual environment:

python -m venv .venv
source .venv/bin/activate

Install dependencies:

python -m pip install -r requirements.txt

Fetch or update the data repository:

./configure

This creates or updates data/, and the CSV files are read from data/csvs/.

Train the model with the default dataset:

python train_pm25_gbt.py

The training script:

  • inner-joins air and weather CSVs for the same year on timestamp
  • normalizes merged timestamps to the weather CSV format
  • appends all yearly merged tables together
  • uses the latest year as the test split by default

Useful commands

Train with explicit test year and time features:

python train_pm25_gbt.py --test-year 2023 --add-time-features

Train without writing models/pm25_gbt.joblib:

python train_pm25_gbt.py --no-save

Export the merged dataset before training:

python train_pm25_gbt.py --merged-out merged_pm25_weather.csv

Use a custom CSV directory:

python train_pm25_gbt.py --data-dir /path/to/csvs

About

Model predicting air quality based on meteorological factors.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages