Learn practical skills, build real-world projects, and advance your career

Open In Colab

#Objective
To predict a possible death event in a case of heart failure of a person

#Dataset
We will use public dataset available on Kaggle

#Major Steps

  • Download data
  • Setup libraries
  • Perform basic analysis
  • Split train and test set
  • Train model
  • Predict
  • Publish and expose as an API
!pip install opendatasets --quiet

#Download dataset from Kaggle
To download dataset from kaggle, we will use opendatasets library developed by jovian

import opendatasets as od
import os 

dataset_url = 'https://www.kaggle.com/andrewmvd/heart-failure-clinical-data'
od.download(dataset_url)

data_dir = os.listdir()[1]
filename = os.listdir("./heart-failure-clinical-data")[0]
file_path = "./" + data_dir + "/" + filename
Please provide your Kaggle credentials to download this dataset. Learn more: http://bit.ly/kaggle-creds Your Kaggle username: aashaymaheshwari Your Kaggle Key: ·········· Downloading heart-failure-clinical-data.zip to ./heart-failure-clinical-data
100%|██████████| 3.97k/3.97k [00:00<00:00, 861kB/s]