Machine learning / explainability
This was never meant to be a diagnostic tool
I wanted to make the model inputs, split, artifacts, and feature explanations inspectable without accidentally presenting the project as something for real patients.
What I tried
- Lock the dataset fingerprint, label contract, and 398 / 85 / 86 split.
- Select a candidate on validation data and keep the governed test set frozen for regression.
- Check model, metric, feature-order, and SHAP checksums before the API uses an artifact.
The rough shape of it
- 1
Dataset rows → validation split → select Logistic Regression
- 2
Frozen artifact → FastAPI prediction
- 3
Model score + feature contribution → read-only React showcase
The result that needed a warning label
The 86-row test result is very strong and contains one error. That makes the caveat more important: a small clean dataset is not evidence of safety or clinical utility.

What came out of it
The dataset has 569 rows and 30 features. On the governed 86-row test, the report records 0.9844 balanced accuracy, 0.9841 malignant F1, 0.9954 ROC-AUC, and 0.9938 PR-AUC.
What the single test error tells us
On governed-test row 73, the true label is malignant but the model predicted benign (malignant-class score 0.1313): the only false negative in the 86-row test.
- Aggregate scores can hide an important failure mode.
- SHAP describes the contribution the model used, not biological causality.
- One clean test set cannot establish clinical safety.

What's still missing
- The dataset is Breast Cancer Wisconsin (Diagnostic), not a symptom form or current patient record.
- The malignant-class score is uncalibrated. It is not risk or a probability of cancer.
- The public showcase is read-only, and this project is not diagnosis, screening, treatment, or clinical decision support.
What I'd change today
- Put the score and explainability limits beside the first prediction view.
- Keep regression-artifact language separate from benchmark language in every report.
- Add sensitivity analysis for correlated features before describing SHAP as a reason.
Source and demo
The repository has the complete setup, tests, and implementation details.