This API predicts diseases based on symptoms provided by the user. It utilizes a Random Forest machine learning model trained on a medical dataset and returns:
- 🏥 A predicted disease
- 📊 A confidence score
- 📖 A detailed description
- ✅ Recommended precautions
🔹 Python
🔹 Flask
🔹 Pandas
🔹 NumPy
🔹 Joblib
🔹 Matplotlib
🔹 Seaborn
🔹 Scikit-learn (Random Forest Classifier, Model Selection, Metrics)
Our Random Forest model was trained and evaluated using cross-validation. Here are the key performance metrics:
- 🎯 Accuracy: 99.08%
- 📈 Precision: 99.00%
- 🔄 Recall: 99.00%
- 📉 F1-score: 98.94%
git clone https://github.com/Oussamaroom67/modelApiPredictApp.git
cd modelApiPredictApp
pip install -r requirements.txt
python api.py
📌 The API will run on: http://127.0.0.1:5000/
- Description: Predicts a disease based on symptoms.
- Request Body (JSON):
{ "symptoms": ["fatigue", "fever", "cough"] }
- Response Example (JSON):
{ "disease": "Influenza", "confidence": 0.87, "description": "Influenza is a viral infection that attacks the respiratory system...", "precautions": ["Drink plenty of water", "Get rest", "Consult a doctor"] }
This project is licensed under the MIT License.
📝 Project developed by Oussama Nouhar, Omaima Siaf, and Souhayla Ghanem.