Video summary
Medicine Recommendation System | Personalized Medical Recommendation System with Machine Learning
Main summary
Key takeaways
Overview
This video is a full, end-to-end tutorial (Python + Machine Learning + Flask) for building a personalized medical recommendation system. The system takes patient symptoms as input and returns:
- A predicted disease
- Doctor-like guidance, including:
- Description
- Precautions
- Medications
- Workout/activity advice
- Diet recommendations
The instructor also walks through creating a Bootstrap + Flask web interface.
Core Technological Flow (What the System Does)
- User enters symptoms in a web form (multiple symptoms as a comma-separated text input).
- Symptoms are converted into a binary feature vector (one-hot style):
- 1 = symptom present
- 0 = symptom absent
- Total: 133 columns → 132 symptom features + 1 target
- A trained ML model predicts the disease/prognosis using multi-class classification.
- The predicted disease label is mapped back to a readable disease name.
- The system queries a structured database (multiple CSV files) to fetch:
- Disease description
- Precautions
- Medication list
- Workout/activity suggestions
- Diet recommendations
- Results are shown in the UI using Flask templates and Bootstrap modals.
ML / Data Model Details
- Problem type: Multi-class classification (multiple possible diseases)
- Dataset size: 4,920 records
- Number of columns: 133
- Target column:
prognosis(encoded disease name → integers) - Input columns: 132 symptom features with binary values
- Target column:
- Missing values: None (already preprocessed)
- Number of classes: 41 diseases (encoded from strings)
Models Trained and Compared
The tutorial trains and evaluates multiple classifiers:
- SVC (Support Vector Classifier)
- Random Forest
- Gradient Boosting
- K-Nearest Neighbors
- Multinomial Naive Bayes
They report 100% accuracy on the test data for the tested models and primarily select SVC afterward.
Model Persistence
- The trained model is saved using pickle
- The Flask backend later loads the saved model to make predictions
Web Application / UI Features
The instructor builds a Flask website with multiple pages:
- Home (
index): symptom input + “recommend” button - About
- Contact
- Developer
- Blog
Front-End
- Uses Bootstrap for layout and navigation
- Displays results via Bootstrap collapsible/modals, such as:
- Disease
- Description
- Precautions
- Medication
- Workouts
- Diet
Project Structure
Includes:
-
data_sets/(training + symptoms/precaution/workout/description/medication CSVs) -
models/(saved SVC model.pkl) -
static/(images such as a logo)
“Database” Design Approach (CSV-Driven Recommendations)
Instead of hardcoding recommendations, the system loads multiple CSV tables and filters them by the predicted disease.
CSV files imported include:
symptoms(used for mapping/label understanding)description.csvprecaution.csvmedication.csvworkout.csvdiet.csv
A helper function (e.g., helper(disease)) returns:
- Description (text)
- Precautions (list)
- Medication list
- Workout list
- Diet list
Deployment / Environment Setup Steps Mentioned
- Create/use a virtual environment
- Install dependencies with pip:
flaskscikit-learn(must match the notebook version used during training)numpy,pandaspickle(via Python standard tooling)
Flask Routes
/→ rendersindex.html/predict→ handles form POST:- performs preprocessing
- predicts disease via SVC
- fetches recommendations
- renders results back to the template
Speaker / Source
- Main speaker: the tutorial’s author/host (“bamum” / channel name shown at the start of the subtitles).