<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aditya Kumar on Medium]]></title>
        <description><![CDATA[Stories by Aditya Kumar on Medium]]></description>
        <link>https://medium.com/@adikmr5?source=rss-ba746b0e16f9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Aditya Kumar on Medium</title>
            <link>https://medium.com/@adikmr5?source=rss-ba746b0e16f9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 05:31:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adikmr5/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Exploratory Data Analysis(EDA)]]></title>
            <link>https://medium.com/datascience-step-by-step/exploratory-data-analysis-eda-c3f4a1b45601?source=rss-ba746b0e16f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3f4a1b45601</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[dataset]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <category><![CDATA[box-plot]]></category>
            <category><![CDATA[seaborn]]></category>
            <dc:creator><![CDATA[Aditya Kumar]]></dc:creator>
            <pubDate>Sat, 28 Sep 2019 15:39:55 GMT</pubDate>
            <atom:updated>2019-09-28T16:09:51.845Z</atom:updated>
            <content:encoded><![CDATA[<p>In statistics, <em>exploratory data analysis(EDA)</em> is an approach to analyse any data set to summerize its key characterstics. This approach involve analysing your data in a visual way with the help of various plots. In data science, EDA is considered as the first step to analyse and characterise the data set.</p><p>If, I will go theoretical, explaining my understanding on EDA, it will be a nerdy apporach! So, lets go visual and lets understand this approach with an example of a data set. I will be using <a href="https://www.kaggle.com/gilsousa/habermans-survival-data-set"><em>Haberman Cancer Survival</em></a> data set from <a href="https://www.kaggle.com/"><em>kaggle</em></a><em>.</em></p><blockquote>Haberman Cancer Survival dataset contains cases from a study that was conducted between 1958 and 1970 at the University of Chicago’s Billings Hospital on the survival of patients who had undergone surgery for breast cancer.</blockquote><p>Now, we have a data set. So, what to do next? Let us start with reading the data set. The column of data set represents the age of patient at which they had undergone their cancer operation. The second column represents the year in which they had undergone their operation. The third column represents number of nodes they had. And the last column represents the patient’s survival, where 1 represents they survived less than 5 years after operation and 2 suggests that patient survived more than 5 years.</p><p>So, now what to do with this data? 🤔 Using this data set, lets predict the survival expectancy of a new patient. Sounds cool! This is where EDA will come in picture.</p><blockquote>I will not go in detail about how to generate these plot as my aim here is to get familiar with EDA</blockquote><p>First, we will plot all colums vs each other. This is called <a href="https://www.quora.com/What-are-pair-plots"><strong><em>pair plot</em></strong></a><strong><em>. </em></strong>This will help us to get an idea of inter-relation of each columns. The image below shows the pair plot.</p><figure><img alt="Pair plot of all columns of the dataset" src="https://cdn-images-1.medium.com/max/915/1*se7Gcnl0A9Bj_rzteK_xQw.png" /><figcaption>Pair plots for the data set</figcaption></figure><p>So, we got our pair plot! We got all combinations of pair of columns i.e. 3C2 graphs, with blue dots representing life expectancy of less than 5 years and orange dots representing life expectancy of more than 5 years. But, we also got age vs age graph and result is not as expected. These graphs with same x and y axes are <strong><em>probability distribution function(PDF). </em></strong>It simply represents the probability or frequnecy of ocuurence of a particular data point.</p><p>By observing all 9 graphs, we can’t get a clear cut life expectancy. The most accurate conclusion we can draw from the above graphs is from the 9th graph where we can say that patient with nodes from 0 to 6 has the highest survival chance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*nsv7hhSchXdviV_hgvTFrQ.png" /><figcaption>The 9th graph</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/1*wQLALn22Yz_oHGsPOtHjig.png" /></figure><p>Now, lets try to get more information from the dataset. Lets analyse the data through <a href="https://en.wikipedia.org/wiki/Cumulative_distribution_function"><strong><em>cummulative distribution function(CDF)</em></strong></a><strong><em>.👈 </em></strong>this graph here have orange line as CDF and blue line as PDF. From this plot, we can say that <em>for about 60% of cases, patient, who got more life expectancy ,was diagnosed with less than 5 nodes.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/1*0PFw4tYiWBig_US-oPnOtw.png" /></figure><p>This plot ☝ represents CDF for age. From this plot, one can clearly say that <em>with increasing age, life expectancy of patients was less.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*bMthgmwPf2suaeX4xV5Jqg.png" /></figure><p>Now, lets analyse the data using <a href="https://towardsdatascience.com/understanding-boxplots-5e2df7bcbd51#targetText=A%20boxplot%20is%20a%20standardized,and%20what%20their%20values%20are."><strong><em>box plot</em></strong></a><strong><em>.</em></strong></p><p>From the box plot below, we are not getting any clear cut conclusion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*WbTzltpukCox9MNFpMBSGg.png" /></figure><p>From <a href="https://en.wikipedia.org/wiki/Violin_plot#targetText=A%20violin%20plot%20is%20a,by%20a%20kernel%20density%20estimator."><strong><em>violin plot</em></strong></a><strong><em>, </em></strong>following obervations are made:</p><ul><li><em>Patients with node value less than 3 have the most probability of more survival.</em></li><li><em>Patient with node value greater than 11 are most probable of having less life expectancy.</em></li></ul><p>Now lets go to some statistics and see, if we could get some more characterstics about the dataset. To do so, lets <em>describe</em> the dataset. On describing the dataset for patients with high suvival rate, we get the following table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*Z1GB32GpDvL-VJJNb1GLrg.png" /><figcaption>Statistics values for patients with more life expectancy</figcaption></figure><p>From the above table, one can conclude that <em>node for 75 percentile of patients with more life expectancy hence lesser nodes patients tends to have higher chance of survival.</em></p><p>Now lets visualize the data using contour plot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*_tvVJv0xrreJ-WhE1lZcsA.png" /><figcaption>Contour plot</figcaption></figure><p>From the above contour plot for patients with more life expectancy, we can conclude that patients with node less than 10 and age between 45–52 have the most life expectancy.</p><blockquote>Find all my codes and related plots in this <a href="https://drive.google.com/open?id=1VmxhEkBQwtyvcSsrSJmYH7a6pVzQbv94">link</a></blockquote><p>Now lets conclude this blog! EDA is a very excellent way to characterise the data and get some good idea about inter-relation between its various parameters.</p><p>If you liked my blog please do share with your folks and if you find some error do let me know in comment box.</p><blockquote>Special thanks to <a href="https://medium.com/u/8dd0982a035a">Prakhar Agarwal</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3f4a1b45601" width="1" height="1" alt=""><hr><p><a href="https://medium.com/datascience-step-by-step/exploratory-data-analysis-eda-c3f4a1b45601">Exploratory Data Analysis(EDA)</a> was originally published in <a href="https://medium.com/datascience-step-by-step">Datascience Step-by-Step</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>