Comparative machine learning frameworks for cardiovascular, metabolic, oncological and neurodevelopmental disease prediction. Independent projects, Jan to Mar 2026.
The interactive version of these projects: a multipage Streamlit app (Home, Diabetes, Breast cancer, Heart disease, Autism, Compare) plus the Colab notebook. This static page documents the analysis below; the app lets you rerun it with your own settings.
Live Streamlit app Diabetes Breast cancer Heart disease Autism Compare Open in Colab Notebook (.ipynb) GitHub repo
| What | Link |
|---|---|
| Live app (Streamlit Cloud) | ml-healthcare-ai.streamlit.app |
| This website (GitHub Pages) | harshini-suresha.github.io/ml-healthcare-app |
| Run notebook (Colab) | Open in Colab |
| Notebook file (.ipynb) | Download raw .ipynb · nbviewer preview |
| Repo | github.com/Harshini-Suresha/ml-healthcare-app |
Run locally: pip install -r requirements.txt then streamlit run app.py. Multipage app: Home (app.py), shared code (ui_common.py, ml_core.py), pages in pages/ including the A-vs-B Compare diff view.
Each project follows the same path: exploratory data analysis, feature engineering, preprocessing, model development and quantitative evaluation.
Highlighted stage is the model. Stages follow each repository's description.
| Project | Area | Approach | Data | Code |
|---|---|---|---|---|
| Heart disease | Cardiovascular | Artificial neural network (13-8-14-1), nonlinear classification | 303 patient records, 13 attributes | Heart-disease |
| Diabetes | Metabolic | K-Nearest Neighbors, three-trial comparative study | Kaggle diabetes dataset, 768 records | Diabetes |
| Breast cancer | Oncology | KNN with cross-validated K versus tuned Logistic Regression | Clinical diagnostic features, malignant vs benign | Breast-Cancer-Prediction |
| Autism (ASD) | Neurodevelopmental | Logistic Regression, XGBoost and SVM compared on a rebalanced dataset | 800 screening records, 22 columns | Autism-prediction |
Same dataset every time. Each trial changed preprocessing, tuning or validation, so the accuracy change can be traced to a cause.
768 patient records, 8 diagnostic features and a binary outcome. Zeros in five columns are not real measurements; they stand in for missing values.
| Feature | Meaning |
|---|---|
| Pregnancies | Number of times pregnant |
| Glucose * | Plasma glucose concentration |
| BloodPressure * | Diastolic blood pressure (mm Hg) |
| SkinThickness * | Triceps skin fold (mm) |
| Insulin * | 2-hour serum insulin (mu U/ml) |
| BMI * | Body mass index (kg/m²) |
| DiabetesPedigreeFunction | Genetic likelihood of diabetes |
| Age | Age in years |
| Outcome | 1 diabetic, 0 non-diabetic |
* a zero in this column means the value is missing.
Computed from the public copy of the dataset (768 rows, 9 columns). Pick a feature to update the histogram and box plot. Zeros in the five missing-as-zero columns are excluded from them.
Pearson r. Teal is positive, red is negative.
Share of 768 records. Insulin is missing for nearly half of them.
All 768 records. Pick two features, then click the plot to place a new patient. KNN votes among the k closest records. Records where a missing-as-zero feature is 0 are left out. Switch to standardized distances and watch the neighbours change: with raw units the feature with the larger numbers dominates.
● non-diabetic ● diabetic ◯ new patient
Leave-one-out KNN accuracy on all 768 records using all 8 features, shown below and recomputed live by the button. Each record is classified from the others. This uses no cleaning or train/test split, so it will not match the trial results below. Standardizing helps most at small k (for example k=3 and k=5); at larger k the two settle at about the same accuracy.
Test accuracy (axis starts at 60). Most of the gain came from scaling and outlier filtering in trial 2.
Train minus test accuracy, in points. A wider gap means more memorization.
Best k per trial against train (grey) and test (teal) accuracy. Smaller k fits the training data tighter.
The train-test gap grew from 18.4 to 20.2 to 24.8 points while test accuracy rose. Trial 3 uses k=1, which memorizes the training set (100% train accuracy), so the 75.2% test figure is the one that counts.
Predicts malignant versus benign from clinical diagnostic features. The focus is on how preprocessing and model configuration change performance, with both models chosen by cross-validation instead of by hand.
Educational implementation, not for clinical diagnosis.
A feedforward network that classifies heart disease from 13 clinical attributes. 303 patient records, 54.5% with the disease, no missing values.
Two ReLU hidden layers and a sigmoid output. Adam optimizer, binary cross-entropy, batch size 8, 100 epochs. Inputs standardized, 70/30 split.
Training accuracy climbs from 49.7% to 92.1% and loss falls from 0.693 to 0.259.
| Accuracy | 85.7% | Precision | 82.7% |
|---|---|---|---|
| Recall | 91.5% | F1-score | 86.9% |
Recall is the strongest score: 43 of 47 patients with the disease were caught, 4 missed.
Specificity (79.5%) is the weakest score: 9 healthy patients were flagged. The model leans toward catching disease.
Box: middle half of patients, line: median, whiskers: min to max, each on its own scale.
800 records with ten screening-question scores plus demographic fields. About 20% are ASD-positive (161 of 800), so the data is heavily imbalanced and the evaluation accounts for it.
ROC-AUC computed from predicted labels. XGBoost scores 1.00 on training data but 0.75 on validation, a clear sign of overfitting. SVM generalizes best (0.80); Logistic Regression has the smallest gap.
| Accuracy | 80.0% | ASD recall | 75.0% |
|---|---|---|---|
| ASD precision | 54.0% | Missed | 9 of 36 |
● no ASD ● ASD. Oversampling copies minority rows in the training set only, so the validation set stays untouched.
Share of the 800 records scoring 1 on each question.
Ethnicity, before merging "?" and "others"
Who filled in the form
Training minus validation ROC-AUC. Smaller is better.
Diabetes. Scaling and outlier filtering lifted test accuracy 4.5 points (70.1% to 74.6%). Everything added in trial 3 gained 0.6 more, while the train-test gap widened to 24.8 points.
Heart. 85.7% accuracy and 91.5% recall on 91 held-out patients, with 4 cases missed. Final-epoch training accuracy of 92.1% is 6.3 points above test.
Autism. Only 20% of records are ASD-positive. XGBoost scores 1.00 ROC-AUC on training data but 0.75 on validation; SVM generalizes best at 0.80.
Breast cancer. K and the Logistic Regression settings are chosen with cross-validation and grid search instead of one lucky split.
| Diabetes | Breast cancer | Heart | Autism | |
|---|---|---|---|---|
| Scaling | StandardScaler, MinMaxScaler | StandardScaler | StandardScaler | StandardScaler |
| Missing values | Inf / NaN rows dropped | Mean imputation | None missing | "?" recoded as Others |
| Outliers | Filtered, extremes removed | – | – | 2 extreme results removed |
| Class imbalance | Class balance checked | Stratified folds | SMOTE explored | Random oversampling |
| Feature engineering | – | – | – | Sum score, age group, log age |
| Models | KNN | KNN, Logistic Regression | ANN, plus RF, LR, SVM tried | LR, XGBoost, SVM |
| Tuning and validation | k scan 1 to 14, 70/30 split over seeds | CV for K, GridSearchCV, repeated stratified CV | GridSearchCV (RF), 5-fold CV (LR) | 80/20 hold-out |
| Reported scores | Accuracy, matrix, report | Accuracy, P, R, F1, matrix, report | Accuracy, P, R, F1, matrix | ROC-AUC, matrix |
| Metric | Formula | What it answers |
|---|---|---|
| Accuracy | (TP + TN) / all | How often the model is right overall. Misleading when classes are unbalanced, as in the 500 / 268 diabetes data. |
| Precision | TP / (TP + FP) | Of the patients flagged, how many truly have the condition. |
| Recall | TP / (TP + FN) | Of the patients who have it, how many were caught. The key screening metric. |
| F1-score | 2PR / (P + R) | One number that balances precision and recall. |
| Confusion matrix | TP FP / FN TN | Where the errors fall, split by type. |
| ROC-AUC | area under TPR vs FPR | Ranking quality across every decision threshold. |
Scores reported in the notebooks: accuracy, precision, recall and F1 (heart), ROC-AUC and a confusion matrix (autism), accuracy and a classification report (diabetes).
Questions about the projects, or want to collaborate?
Every live URL for this project in one place.