1 / 12

KDE PLOT

Bivariate analysis is the method to perform visualization for 2 variables. The plots such as KDE plot, combined KDE and rug pot, correlation using heatmap function gives a better way to visualize the data. This section will through light on the same with examples.<br>To learn more about online data science courses or artificial intelligence and machine learning courses visit:http://bit.ly/DatascienceCourse

Télécharger la présentation

KDE PLOT

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. KDE PLOT

  2. Kde plot • The kernel density estimation (KDE) plot is a technique for visualising the distribution of observations in a dataset that is similar to a histogram.  • KDE describes data using a continuous probability densitycurve of one or more dimensions. • Eg:with sns.axes_style('white'):sns.jointplot(x ='Attack Point',  y ='Defense Point', data = pokemon_data, kind ='kde')

  3. O/P:

  4. sns.kdeplot(pokemon_data['Attack Point'],pokemon_data['Defense Point'],sns.kdeplot(pokemon_data['Attack Point'],pokemon_data['Defense Point'], color = 'red')plt.show() • O/P:

  5. Clipping and setting the limit for the axes of the kde plot is also possible using clip argument and xlim ,ylim respectively. • Eg:sns.kdeplot(pokemon_data['Attack Point'], pokemon_data['DefensePoint clip = (0,100))plt.show() • O/P:

  6. Eg 2:sns.kdeplot(pokemon_data['Attack Point'], pokemon_data['Defense Point'])plt.xlim(0,750)plt.ylim(0,500) O/P:

  7. Combining kde plot and rug plot • Rug plot and kde plot can be combined together for better visualization. • Various parameters of plots such as height,color can also be manipulated. • Eg:sns.kdeplot(pokemon_data['Attack Point'],pokemon_data['Defense Point'])sns.rugplot(pokemon_data['Attack Point'],color = 'r',             height = .05)sns.rugplot(pokemon_data['Defense Point'],color = 'b', vertical = True,  height = .05)plt.show()

  8. O/P:

  9. Corelation:Heatmaps • Seaborn heat maps appeal to the eyes, and they appear to send direct data messages almost instantly. This is why this correlation matrix visualisation tool is commonly used by data analysts and data scientists alike.  • Interestingly, the Seabornheatmap feature has 18 arguments that can be used to configure a correlation matrix to boost how quickly insights can be derived. • Thus it will give the relation between all the rows and columns of the data. • The heatmap() function can be used for the same. Also the colour shades in the plot decides regarding the relation. Darker the shade high is the corelation between those 2 features.

  10. Example • cormat = pokemon_data.corr() ...to get the relation plt.subplots(figsize = (7,7))sns.heatmap(cormat, vmax = .8square = True, ...shape in heatmapannot = True ...value will be visible in the boxfmt ='.3f',  ...upto 3 decimal pointscmap = 'Blues') ...defines the colourplt.show()

  11. THANKS FOR WATCHING!!! • For more Follow us on social media platforms: • Instagram: learnbay_datascience • Facebook: learnbay • LinkedIn: Learnbay • Twitter: Learnbay1

More Related