This repository features a hands-on, practical implementation of fundamental Machine Learning algorithms applied to a clinical heart disease dataset. The project transitions from continuous baseline regressions to an optimized, multi-feature classification model.
The project utilizes a clinical heart disease dataset (heart.csv) featuring essential medical indicators such as age, chol (cholesterol), thalach (maximum heart rate reached), and a binary target column indicating the presence of heart disease (
- Goal: Predict a continuous target—specifically the patient's resting blood pressure (
trestbps). - Features Used:
age,chol, andthalach. - Methodology: The data was split into an 80% training set and a 20% testing set. The model was optimized minimizing the Mean Squared Error (MSE) via Gradient Descent.
- Outcome: Successfully extracted the learned weights, bias, and a final Cost (MSE) of ~289.88.
- Goal: Transition into binary classification to predict whether a patient has heart disease (
target). - Features Used:
age,chol, andthalach. - Methodology: Evaluated using classification metrics (
accuracy_score) through a standard sigmoid mapping framework. - Outcome: Achieved a baseline test classification accuracy of 63.90%.
- Goal: Maximize classification performance by unlocking the dataset's full diagnostic capacity.
- Methodology: Dropped the target column to train the model on all available clinical features simultaneously. To ensure absolute mathematical convergence down the cost function landscape without bottlenecks, the maximum training iterations parameter (
max_iter) was expanded to 3000. - Outcome: The evaluation accuracy sharply escalated from 63.90% to 79.51%, empirically validating the machine learning principle that rich, multi-dimensional feature representation yields superior model decision boundaries.
- Language: Python
- Environment: VS Code (Jupyter Notebooks)
- Libraries:
pandas,scikit-learn