Seaborn package is an enhanced version of Matplotlib, which needs to be installed before it can be used.
All graphics plt.show You can also use the create canvas below
fig,ax= plt.subplots () a canvas
fig,(ax1,ax2) = plt.subplots (ncols = 2) ා two canvases
1) Single feature statistical chart countplot
sn.countplot ( train.mnth )#Discrete features can be used to describe the number of sample points.
2) Distplot of single feature statistics
sn.distplot ( train.cnt.values , bins = 50, KDE = true) ා continuous features can be used, bins = 50 is divided into 50 columns, KDE = true shows the core density line. If the tail of the figure is very special, it may be a singular point (outlier, noise point), consider removing it.
3) Double feature violin diagram
sn.violinplot (data = train [['yr ','cnt']], x = yr, y = CNT) # displays the data distribution and its probability density, the black bar in the middle represents the quartile range, the fine black line extending from it represents the 95% confidence interval, and the white dot is the median.
4) Double characteristic box diagram
sn.boxplot (data = train, x = yr, y = CNT), also known as box chart, box chart or box line chart, is a kind of statistical chart used to display the data of a group of data dispersion. It shows the order from top to bottom: abnormal value (may not be), maximum value, upper quartile, median, lower quartile, minimum value, abnormal value (sometimes not, and pay special attention if any).
5) Double characteristic bar graph
fig,(ax1,ax2) = plt.subplots (ncols = 2) ා one canvas, two axes
sn.barplot (data = train, x = Holiday ', y = cnt', hue = weatherset ', ax = ax1) ᦇ hue = weatherset', which is distinguished by weatherset
sn.barplot (data = train, x = working day ', y = cnt', hue = season ', ax = AX2) # hue = season', which can be distinguished by season
6) Double feature line graph
fig,ax = plt.subplots ()
sn.pointplot (data=train[['dayofyear','cnt', 'yr']],x='dayofyear',y='cnt',hue='yr',ax=ax)
#Hue ='yr 'refers to the year of distinction. Hue refers to color
ax.set (title="dayly distribution of counts")
plt.show ()
7) Relational thermodynamic diagram
corrMatt = train[["temp","atemp","hum","windspeed","cnt"]].corr()
mask = np.array (corrMatt)
mask[ np.tril_ indices_ from(mask)] = False
sn.heatmap (corrMatt, mask=mask,
vmax=1, square=True,annot=True)
plt.show ()
8) Double characteristic scatter plot
sn.scatterplot (x= train.GrLivArea Y= train.SalePrice )
plt.title ("looking for outliers") (drawing title)
plt.sho