digital-cognition-co-in / DigitalCognition

DigitalCognition - Main repo - Core Product
2 stars 2 forks source link

Kernel Density Estimation - Kernel Density Plot #59

Open RohitDhankar opened 4 years ago

RohitDhankar commented 4 years ago

A Kernel density estimation , is a non-parametric method for estimating the probability density function - PDF of a Random Variable. Also as a generic EDA approach - the , kernel density plots are an effective way to view the distribution of Continuous Variables.

Write a python method to create a - Kernel Density Plot , use the charting library Bokeh ( https://github.com/bokeh/bokeh) or Plotly (https://plotly.com/python/getting-started/#overview)


You may use any sample data sets . A preferred data set is the - MTCARS Dataset. Post your code here in a Jupyter Notebook along with a CSV file with sample data used .


Any doubts or any further clarifications required kindly contact Rohit - WhatsApp Text = +91-9871050873 or LinkedIn Text = https://www.linkedin.com/in/rohitdhankar/

RohitDhankar commented 4 years ago

Hi @UtkarshChaurasia - you had submitted this code - request you to code for Bokeh inplace of SeaBorn - thanks

#Kernel Density Estimation
import scipy.stats as stats
j=sns.jointplot(data=df, x="Age",y="AN", kind="kde",height=10)
j.annotate(stats.pearsonr)
plt.ylim(-3,10)
plt.ylabel("Cancer")
plt.show()
RohitDhankar commented 4 years ago

https://docs.bokeh.org/en/0.8.2/docs/gallery/kde.html this one says its from an older version of Bokeh --- the latest version of Bokeh doesnt seem to have a KDE plot . The documentation on this page refers to a PREVIOUS VERSION.

For the latest release, go to http://bokeh.pydata.org/en/latest/

WhatsApp Image 2020-05-11 at 13 31 19

this is still open - we need a KDE plot preferably from Bokeh