Git Product home page Git Product logo

amansrv / cardio-care-predictor Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.04 MB

Developed a Flask REST API-based web application to predict the probability of coronary heart disease by analyzing nine patient parameters extracted from medical histories.

Home Page: https://cardio-care-predictor.netlify.app/

License: MIT License

HTML 39.47% CSS 18.90% JavaScript 41.63%
aiml css html javascript webapp

cardio-care-predictor's Introduction

Cardio Care Predictor

  • Web Application using Flask REST API which predicts the probability of Coronary Heart Disease in a patient taking 9 different parameters based on the patient's history as input.
  • The API uses a Logistic Regression Model from sci-kit-learn trained on the Framingham Heart Study Dataset from Kaggle. The model achieved a test accuracy of around 88%.

Project Demo

Table of Contents

General Information About The Project

  • We live in an era where computers can predict the weather, stocks, and human thoughts too. Then why are we still lagging back in healthcare, why are we still hearing, “deaths due to sudden cardiac arrest!”
  • Can’t computers predict heart health? No, they can. The only problem is ‘Accessibility’. We need a project wherein a person should be able to check his/her heart health or the probability of having Cardiac disease ANYTIME, ANYWHERE, EASILY, FOR FREE. Just with some common inputs!!
  • Once the diagnosis is done, the project should suggest measures accordingly.
  • We have developed a web application that can easily predict the possibility of a user having a heart attack.
  • With the help of HTML form we will collect the data from the user, and integrate it with javascript, and with the help of health API, we will showcase the percentage of risk of having cardiac arrest, also suggesting tips accordingly.
  • The project also consists of a chatbot that will be used for Hospital appointment booking when the user gets acknowledged as high-risk.
  • The second major element of the website is the Advanced BMI/BMR calculator. The calculator will subsequently also show how little or more the weight of the user is, the calories required to get in balance, tips according to the BMI, BMR charts, etc. The final part of the project displays the various heart diseases linked directly or indirectly, showing their symptoms, precautions, and the best hospital in India for a particular disease, locating it with the help of Google Maps API on our website.
  • Website will be responsive so as to be accessible on mobile phones, tablets, laptops, and PCs. To make the website function quickly, the website is authentication-free, and there is no database attached and no data has been stored that will also maintain the privacy of the user's medical details.

Usage

  • It's Easy to Use Website
  • Input generic information like age, sex, no. of cigarettes smoked per day, cholesterol level, blood pressure, whether diabetic patient, sugar level, and heart rate.
  • For BMI, BMR input height, weight, age, and exercise type.

Technologies Used

setTimeout(() => {
        fetch(`https://cardio-care-predictor-api.onrender.com/predict?age=${age}&sex=${sex}&cigs=${cigs}&chol=${cholestrol}&sBP=${sBP}&dia=${diabetes}&dBP=${dBP}&gluc=${glucose}&hRate=${heartRate}`)
        .then(res => res.json())
        .then(data => {
          prediction = parseFloat(data['probability'][0][1]).toFixed(5);
          console.log(prediction)
          document.querySelector('.loader').style.display = 'none';
          if (cigs > 0 & prediction > 0.07) {
            document.querySelector('.clearfix').innerHTML = `
            <p class="nl-form">Quit Smoking Today<br>Predicted probability of having coronary heart disease (Heart Attack)is ${prediction*100} % <br>Please Consult Cardiologist</p>`;
          }
          else if (cigs > 1 & prediction < 0.07){
            document.querySelector('.clearfix').innerHTML = `
            <p class="nl-form">Quit Smoking Today<br>Predicted probability of having a coronary heart disease (Heart Attack) is ${prediction*100} %</p>`;
          }
            else{
              document.querySelector('.clearfix').innerHTML = `
              <p class="nl-form">Predicted probability of having a coronary heart disease (Heart Attack) is ${prediction*100} %</p>`;} 
        })

cardio-care-predictor's People

Contributors

amansrv avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.