Cerebral Stroke Prediction
Logistic regression with the gradient descent written by hand
There is a custom logistic regression class in this project instead of an import, with the gradient descent written out as a loop. A scikit-learn KNN model sits next to it as a baseline, so the hand-written one has something to be measured against.
Class imbalance is handled by random over- and under-sampling. Both models are scored on accuracy, precision, recall, and F1, rather than on accuracy alone, which on an imbalanced medical dataset would be close to meaningless. The final classifier is wrapped in a small desktop window so somebody who does not write code can enter the features and read a risk score.
The point is not the score. The point is that the mathematics was typed out once, by hand, before it was ever imported.
What this does not do
- It is a demonstration of the mathematics on a public dataset. It is not a medical tool and nothing here should be read as one.