Views
No views yet
| Model | Description |
|---|---|
| Decision Tree | Tuned with GridSearchCV over depth, split, and leaf parameters |
| Logistic Regression | Best solver selected automatically from lbfgs, liblinear, newton-cg, sag, saga |
| Support Vector Machine (SVM) | Best kernel selected automatically from linear, poly, rbf, sigmoid |
| Random Forest | Tuned with GridSearchCV, currently the best-performing model |
.
├── app.py # Streamlit web app (3 tabs: Predict, Bulk Predict, Model Information)
├── decision.pkl # Trains the Decision Tree model
├── logistic.pkl # Trains the Logistic Regression model
├── support.pkl # Trains the SVM model
├── random.pkl # Trains the Random Forest model, scaler, and feature list
├── requirements.txt # Python dependencies
├── sample_bulk_predict.csv # Example CSV for testing the Bulk Predict tab
└── README.mdNote: The training scripts use a.pklextension (despite being Python scripts) to match the original project naming. They are plain Python files and should be run withpython <filename>.pkl.
Age, Sex, Chest pain type, BP, Cholesterol, FBS over 120, EKG results,
Max HR, Exercise angina, ST depression, Slope of ST,
Number of vessels fluro, Thallium, Heart DiseaseHeart Disease contains Presence / Absence labels, which are mapped to 1 / 0 during training.cleaned_data.csv) is not included in this repository. Place your own copy in the project root before running the training scripts.1git clone https://github.com/<your-username>/<your-repo>.git
2cd <your-repo>pip install -r requirements.txtcleaned_data.csv in the project root..pkl) the app needs:1python decision.pkl
2python logistic.pkl
3python support.pkl
4python random.pklstreamlit run app.pyhttp://localhost:8501.| Field | Encoding |
|---|---|
| Sex | 1 = Male, 0 = Female |
| Chest pain type | 1 = Typical Angina, 2 = Atypical Angina, 3 = Non-anginal Pain, 4 = Asymptomatic |
| FBS over 120 | 1 = True, 0 = False |
| EKG results | 0 = Normal, 1 = ST-T Wave Abnormality, 2 = Left Ventricular Hypertrophy |
| Exercise angina | 1 = Yes, 0 = No |
| Slope of ST | 1 = Upsloping, 2 = Flat, 3 = Downsloping |
| Thallium | 3 = Normal, 6 = Fixed Defect, 7 = Reversible Defect |