Skip to content

Project for predicting Heart_Disease using Logistics Regression

Notifications You must be signed in to change notification settings

Sanjay9783/Heart_Disease_prediction

Repository files navigation

forthebadge made-with-python


Logo

Heart_Disease_Prediction

Machine Learning Project
Explore the Repo »

View Flask app code · Model Building

About The Project

Heart disease prevention has become more important than ever. In order to ensure that more people may live healthy lives, effective data-driven methods for predicting cardiac problems can enhance the overall research and preventive process. Machine learning is useful in this situation. The heart illnesses are predicted with the use of machine learning, and the forecasts are rather accurate.

In order to determine whether a patient has heart disease, I've employed a range of Machine Learning algorithms that were developed in Python. This classification algorithm predicts whether or not cardiac disease is present by using a binary variable as the goal variable and a range of characteristics as the input features.

  • Building a Flask App hosted on Heroku.
  • Sklearn for pre-processing and Model Building
  • Pandas, Numpy for csv reading, Data Processing, Data Cleaning, Visualization etc.
  • Machine Learning algorithms used: Logistic Regression (Scikit-learn)

Deployed app

Screenshot (10)

LINK TO HEROKU APP

Model Building

  • Classification algorithm decided to predict the features Classes from the dataset which is Binary classification (0 = Healthy Heart, 1 = Defective Heart).
  • Models used : Logistic Regression.

Flask App

  • Importing the Flask module and creating a Flask web server from the Flask module.
  • Create an object app in flask class with __name__ which represents current app.py file.
  • Create / route to render default page html.
  • Create a route /predict to get user input for Classification.
  • Run the flask app with app.run() code.

Heroku Deployment

  • Create new repo in Github and push all the data using Git.
  • Login to Heroku using heroku login and setup the app in Heroku Web.
  • Connect new Github repo in heroku and deploy the app

Technologies used

Python scikit-learn Flask NumPy Pandas

Tools used

PyCharm GitHub Heroku