Medical Recommendation System Lecture/Presentation Notes
Introduction
- Project Overview: An end-to-end medical or medicine recommendation system using Machine Learning and Python.
- Purpose: Can be used as a Final Year Project (FIP).
- Interface: Comparable to a medical website with sections such as contact, developer, blog, and a home page with a symptom input form.
Project Functionality
- Input: User types in patient symptoms (e.g., coughing, itching).
- Prediction: Uses AI/ML trained model to predict disease based on symptoms.
- Database Comparison: Predicted disease is compared with a database containing medication, precautions, workouts, diets, and descriptions.
- Output: System displays predicted disease, description, precaution, medication, workout, and diet relevant to the disease.
System Working
- Symptom Input: User enters symptoms into a search bar.
- Model Processing: AI model predicts disease based on symptoms entered.
- Database Tables: Include medication, precaution, workout, diet, and description related to predicted diseases.
- Results Display: Predicted disease, description, precaution, medication recommendation, workout, and diet provided.
Example Workflow
- User Input: Itching, coughing, sleeping.
- Predicted Disease: Fungal infection, a common skin condition.
- Precautions: Bath twice, keep infected area dry, use clean clothes.
- Medication: Antifungal cream, specific antibiotics.
- Workouts: Avoid sugary foods, consume probiotics.
- Diet: Garlic, coconut oil, turmeric.
Data & Model Details
- Data: Training data with 133 columns (132 symptoms and prognosis column with 41 diseases).
- Problem Type: Multi-class classification problem.
- Model: Several machine learning models including SVM, Random Forest, etc.
- Training: Data is preprocessed; 70% for training, 30% for testing.
- Evaluation: Various performance metrics like accuracy, confusion matrix.
- Implementation: Python libraries used - pandas, numpy, sklearn, pickle.
Web Integration
- Front End: HTML, CSS with Bootstrap framework for styling and layout.
- Back End: Flask framework to handle data input and output.
- Form Handling: User symptom input form processed via Flask, displaying results using Ginger templates.
- Pages: Index (home), contact, developer, blog.
Additional Considerations
- Data Handling: Dataset loading, preprocessing, encoding.
- Model Loading/Saving: Using
pickle
for model persistence.
- Custom CSS: Inline styling for form and result display.
- Bootstrap Components: Used for responsive design and dynamic content display (e.g., buttons, model for popup display).
Conclusion
- Functionality: The system mimics a doctor's recommendation functionality including suggesting proper precautions, medications, workouts, and diets based on a given symptom.
- Application: Practical use for developing advanced healthcare systems or academic projects.
Instructions & Setup
- Folders:
models
, datasets
, static
for images, templates
for HTML files.
- Running the System: Utilizing Flask to route different web application sections.
- Error Handling: Common coding errors related to Flask and dataset paths. Ensure correct paths and check for misspellings.
Additional Notes:
- Remember: Every function, model, or data loading should be commented and tested individually to ensure data consistency and accuracy.
- Dependencies: Detailed installation of required Python packages and ensuring compatibility versions.
Tools like Bootstrap and Flask significantly ease the rapid development of interactive and responsive web applications for machine learning projects.