Are you sure you want to delete this access key?
This project aims to predict the likelihood of weather-sensitive diseases using machine learning. By analyzing historical climate and health records, it provides early warnings for disease outbreaks, empowering public health systems to respond proactively.
Weather patterns influence the prevalence and spread of many diseases such as asthma, flu, and other respiratory conditions. The challenge is to build a robust prediction system that can:
The dataset contains features related to weather and environmental measurements along with disease labels. Typical columns include: Age, Gender, Temperature (C), Humidity, Wind Speed (km/h), nausea, joint_pain, abdominal_pain, high_fever, chills,...,back_pain, knee_ache.
Dataset Source: Additional info about the data can be found on Kaggle.
Metric | Description |
---|---|
Accuracy | Overall correct predictions |
Precision | Correctness among positive predictions |
Recall | Coverage of actual positives |
F1-Score | Harmonic mean of precision & recall |
git clone https://github.com/Danselem/weather-health.git
cd weather-health
The project makes use of Makefile
and Astral uv. Click the Astral link to see the details of the package and how to install it.
To create and activate an environment:
make init
make install
There are two options to set up MLflow
Use AWS EC2 and S3
Ensure terraform is installed on your PC and you have AWS credentials set up on your PC with aws configure
. Next, cd infra
then follow the instructions in infra for a complete set up of AWS resources including EC2
, RDS
, S3
, Kinesis
, Lambda
, etc.
Use DagsHub
Sign up at Dagshub and obtain an API key and create a project repo. After that, run the command to create a .env
file:
make env
Next, fill the .env
file with the right information.
This project uses Prefect
for running the ML pipeline. To start the prefect server, run the command:
make prefect
This will start a prefect server running at https://127.0.0.1/4200.
To run the pipeline,
make pipeline
This will proceed to load the data, clean it, transform it and start the hyper-parameter tuning. See image below for the prefect modeling pipeline
It will also log the ML experiments in Dagshub. For example, see below.
.
All experiments ran for this project can be accessed in here.
fetch-best-model
The above command will fetch the best model from the Dagshub ML server and save it in the models repo. With this, we are ready to serve the model.
Generate sample data for testing the serve service.
make sample
Test the local deployment
make serve_local
Test for [docker](/Dockerfile)
deployment
Build the docker
make build
Start the docker container
make run
Then test the serve script:
make serve
A simulated inference was performed in this project for testing observability with Evidently
. See the observability directory.
Start the container
start-monitoring
This will start a docker compose with postgres
, adminer
and grafana
.
Adminer can be accessed at https://127.0.0.1/8080. Grafana can be accessed at https://127.0.0.1/3000.
Simulate the inference with the command:
make observe
For example, see
To test your setup or add unit tests:
pytest tests/
.feature_importances_
are supported for feature explanation.This project is licensed under the MIT License.
Created by Daniel Egbo. Feel free to reach out with questions, issues, or suggestions.
Press p or to see the previous file or, n or to see the next file
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?