Skip to content

syedmuhammadshoaibamjad/DHC_Internship_Task_03

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task 03: Heart Disease Prediction & Analysis

📋 Project Overview

This project was completed as part of my DHC Internship. The goal was to analyze the UCI Heart Disease dataset to identify key health trends and build a machine learning model capable of predicting heart disease risk with high clinical reliability.

📊 Task Report & Findings

1. Exploratory Data Analysis (EDA)

  • Data Inspection: Utilized .head(), .info(), and .describe() to verify 303 patient records and 14 clinical features.
  • Visualizations: - Histograms: Revealed a peak in heart disease cases for patients aged 50–60.
    • Boxplots: Identified significant outliers in Cholesterol (chol) and Resting Blood Pressure (trestbps).
  • Handling Outliers: Implemented StandardScaler to normalize feature ranges, ensuring extreme values (like high cholesterol) didn't skew the model's coefficients.

2. Machine Learning Model

  • Algorithm: Logistic Regression (Classification).
  • Setup: 80% Training Data / 20% Testing Data.
  • Optimization: Resolved convergence warnings by increasing max_iter and applying feature scaling for mathematical efficiency.

3. Evaluation Results

The model achieved high performance, proving its reliability for medical screening:

  • Final Accuracy: 85.25%
  • F1-Score: 0.86 (indicates a strong balance between Precision and Recall).
  • Confusion Matrix Performance:
    • Correctly identified 25/29 healthy cases.
    • Correctly identified 27/32 disease cases.

🛠️ Setup Instructions

To run this project on your local machine:

  1. Clone the repository.
  2. Activate your virtual environment: source venv/bin/activate
  3. Install dependencies: pip install -r requirements.txt
  4. Run the notebook: jupyter notebook Model_Evaluation.ipynb

📧 Contact

About

A Task regarding Basic ML, Data Analysis and Data Visualization. Assigned by Internship Team Lead at Developershub.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors