Predicts the likelihood of hospital admission for patients with pneumonia.
- Jupyter Notebook 89.4%
- Python 10.4%
- Dockerfile 0.2%
| .github/workflows | ||
| .streamlit | ||
| datasets | ||
| docs | ||
| images | ||
| pneumonia_predictor | ||
| saved_models | ||
| .gitattributes | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .python-version | ||
| app.py | ||
| CONTRIBUTING.md | ||
| Dockerfile | ||
| LICENSE | ||
| main.ipynb | ||
| mkdocs.yml | ||
| packages.txt | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
| uv.lock | ||
| title | emoji | colorFrom | colorTo | sdk | app_port | pinned | license |
|---|---|---|---|---|---|---|---|
| Pneumonia Predictor | 🚀 | blue | indigo | docker | 8501 | false | gpl-3.0 |
Documentation: https://datsudo.github.io/pneumonia-predictor/
Setup
Install the following prerequisites:
Make sure that poetry is installed by running:
poetry --version
# Result must be:
# Poetry (version X.X.X)
Clone this repository:
git clone https://github.com/datsudo/pneumonia-predictor
Then install the project dependencies when you're inside the directory:
poetry install
Before working on this project, ALWAYS make sure that everytime you're working on this project,
you're in the proper virtual environment created by poetry:
poetry shell
After that, setup the provided pre-commit hooks (to fix proper code styling for staged files before commiting) after cloning.
pre-commit install
Running
Sample usage
from pneumonia_predictor.backend.rf_active_smote import RfActiveSMOTE()
# Create an RFActiveSMOTE instance
rf_as = RfActiveSMOTE(X_train, y_train, X_test, y_test, "target_column_name")
# Training
rf_as.smote.train(n_iterations=5)
# Other options
rf_as.save("model_name") # will save the model at ./saved_models/model_name.pkl
rf_as.display_results("acc") # Print results [acc (Accuracy), min (Minority), maj (Majority), avg (Weighted Average)]
Web app
Open the app by running
streamlit run app.py
The web app will become accessible at http://localhost:8502.
License
This project is licensed under GNU General Public License v3.0.