当前位置:网站首页>Machine learning Seaborn visualization
Machine learning Seaborn visualization
2022-07-05 07:14:00 【RS&Hydrology】
Main records seaborn Visual learning notes ( Understand which functions to draw images are available ).
List of articles
- One 、seaborn principle
- Two 、 Variable distribution
- 1.sns.boxplot(): View the value range of numeric variables
- 2.sns.displot(): View the distribution of variables
- 3.sns.jointplot(): Plot the joint distribution and respective distribution of two variables
- 4.sns.pairplot(): Plot the joint distribution of all numerical variables in pairs
- Reference material
One 、seaborn principle
picture source :https://www.bilibili.com/video/BV1VX4y1F76x/
- boxenplot: Suitable for big data
- Distribution diagram of numerical variables in different categories :stripplot;swarmplot;violinplot
- FaceGrid,PairGrid You can customize the drawing function
see seaborn edition :sns.__version__
Version update :pip install —upgrade seaborn
Two 、 Variable distribution
1.sns.boxplot(): View the value range of numeric variables
sns.boxplot(): View the value range of numeric variables , Whether there are outliers .
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
print(sns.__version__)
# print(sns.get_dataset_names())
df = pd.read_excel('D:/1.xlsx')
sns.boxplot(data=df,x="Height")
plt.show()
2.sns.displot(): View the distribution of variables
- sns.displot(kind = hist) # Draw histogram
Histogram :sns.histplot(bins,hue,shrink)
bins: change bin numbers
hue: Category variable
shrink: Zoom factor - sns.displot(kind = kde) # Plotting kernel density estimates (kernel density estimate (KDE)), It is a method to visualize the distribution of observations in data sets , Similar to histogram .KDE Use a continuous probability density curve of one or more dimensions to represent data .
- sns.displot(kind = ecdf) # Represents the proportion or count of observations below each unique value in the dataset . Compare with histogram or density diagram , Its advantage is that each observation is directly visualized , This means that there is no need to adjust the box dividing or smoothing parameters .
penguins = sns.load_dataset("penguins")
sns.ecdfplot(data=penguins, x="flipper_length_mm")
- sns.countplot(data=df,x=“class”) Number of Statistics
3.sns.jointplot(): Plot the joint distribution and respective distribution of two variables
sns.jointplot(dataset,x,y,kind)
sns.jointplot() Function upgrade :
JoinGrid, Can pass g.plot() Custom function .g = sns.JoinGrid(); g.plot(sns.histplot,sns.boxplot)
4.sns.pairplot(): Plot the joint distribution of all numerical variables in pairs
sns.pairplot() Function upgrade :
PairGrid, Can pass g.map() Custom drawing function
Reference material
边栏推荐
- npm install -g/--save/--save-dev的区别
- The difference between NPM install -g/-save/-save-dev
- Matlab在线性代数中的应用(四):相似矩阵及二次型
- The problem of configuring opencv in qt5.13.2 is solved in detail
- PHY驱动调试之 --- MDIO/MDC接口22号和45号条款(一)
- [software testing] 06 -- basic process of software testing
- Brief description of inux camera (Mipi interface)
- PHY drive commissioning --- mdio/mdc interface Clause 22 and 45 (I)
- What is soda?
- Mipi interface, DVP interface and CSI interface of camera
猜你喜欢
Ros2 - first acquaintance with ros2 (I)
1290_FreeRTOS中prvTaskIsTaskSuspended()接口实现分析
SD_ CMD_ RECEIVE_ SHIFT_ REGISTER
Solve tensorfow GPU modulenotfounderror: no module named 'tensorflow_ core. estimator‘
Concurrent programming - deadlock troubleshooting and handling
Concurrent programming - how to interrupt / stop a running thread?
【软件测试】03 -- 软件测试概述
第 2 章:小试牛刀,实现一个简单的Bean容器
【软件测试】02 -- 软件缺陷管理
【idea】Could not autowire. No beans of xxx type found
随机推荐
[node] NVM version management tool
Ros2 - function package (VI)
Unity UGUI不同的UI面板或者UI之间如何进行坐标匹配和变换
[framework] multi learner
testing framework
Ros2 - ros2 vs. ros1 (II)
The difference between new and malloc
2022年中纪实 -- 一个普通人的经历
Binary search (half search)
氫氧化鈉是什麼?
docker安装mysql并使用navicat连接
postmessage通信
Ros2 - workspace (V)
Ret2xx---- common CTF template proposition in PWN
Solve tensorfow GPU modulenotfounderror: no module named 'tensorflow_ core. estimator‘
ROS2——node节点(七)
Jenkins reported an error. Illegal character: '\ufeff'. Class, interface or enum are required
inux摄像头(mipi接口)简要说明
摄像头的MIPI接口、DVP接口和CSI接口
Ros2 - first acquaintance with ros2 (I)