Analytics Vidhya

Analytics Vidhya is a community of Generative AI and Data Science professionals. We are building the next-gen data science ecosystem https://www.analyticsvidhya.com

How Relevant is your HeatMap in Machine Learning Model

Aditya Srivastva
Analytics Vidhya
Published in
4 min readMar 21, 2021

--

Proving relevant features for your machine learning model

Photo by Clay Banks on Unsplash

Many of us agree with me that human mind understand graphical representation way better than any numeric forms of data. That’s the place where graphs comes into the picture. Many ML developers uses heatmap in machine learning model. But do we actually understand the meaning of it? Even we do, does it actually justify your model?

Today I will be digging deep into Seaborn heatmap and justifying using a ML model so that it answers our questions.

The actual purpose of this article to understand the meaning of the heatmap rather than creating the ML model. So we will be having little bit of background setup and little EDA(Exploratory data analysis) and more of heatmap understanding.

So close the door, grab a coffee☕ and lets start.

Problem: We will be having a classification problem data which state that does a person tent to have a heart disease if he/she has the reading involve these factors. (find the data here)

  1. age: age of the person in years.
  2. sex: 1 for male 0 for female
  3. cp: chest pain (0,1,2,3)
  4. trestbps: rest BP
  5. chol: cholestoral
  6. fbs: blood sugar on fasting.
  7. restecg: electrocardiographic
  8. thalach: maximum heart rate.
  9. exang: exercise with angina
  10. oldpeak: heart condition while exercising.
  11. slope: slope of the heart while exercising
  12. ca: indicate the blood movement
  13. thal: thalium stress (the more the danger)
  14. target: 1-person tent to have disease, 0-person dosnt tent to have any heart disease.

Alright lets start with little EDA

What kind of data do we have here?

Head set of the data top 5 results

Target will be our dependent variable and rest will be independent variable. From the file we can say…

--

--

Analytics Vidhya
Analytics Vidhya

Published in Analytics Vidhya

Analytics Vidhya is a community of Generative AI and Data Science professionals. We are building the next-gen data science ecosystem https://www.analyticsvidhya.com

Responses (1)