Skip to content

Prabinkarki67/diabetesPrediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Diabetes and Heart Disease Risk Prediction using Logistic Regression from Scratch

This project implements logistic regression from scratch using NumPy to predict diabetes and 10-year risk of heart disease based on patient health data.


Dataset

  • File: diabData.csv
  • Columns include:
    • male – Gender (0 = Female, 1 = Male)
    • age – Age in years
    • education – Education level
    • currentSmoker – Whether currently smoking (0/1)
    • cigsPerDay – Number of cigarettes per day
    • BPMeds – On blood pressure medication (0/1)
    • prevalentStroke – History of stroke (0/1)
    • prevalentHyp – History of hypertension (0/1)
    • diabetes – Diabetes status (0/1)
    • totChol – Total cholesterol
    • sysBP – Systolic blood pressure
    • diaBP – Diastolic blood pressure
    • BMI – Body mass index
    • heartRate – Heart rate
    • glucose – Glucose level
    • TenYearCHD – 10-year risk of coronary heart disease (0/1)

Project Overview

  • Implemented gradient descent manually to train logistic regression.
  • Computes weights and bias without using sklearn’s LogisticRegression.
  • Includes:
    • Sigmoid function
    • Gradient calculation
    • Accuracy computation
    • Predicting for new user input

How to Run

  1. Clone or download this repository.
  2. Open diabetes.ipynb in Jupyter Notebook.
  3. Run all cells in order:
    • Load and scale data
    • Train the model
    • Test accuracy
    • Predict new input

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors