Seaborn package is an enhanced version of Matplotlib, which needs to be installed before it can be used.
All graphics plt.show () to display, or 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 characteristic violin picture
sn.violinplot (data = train [['yr ','cnt']], x = "yr", y = "CNT"). The data distribution and its probability density are displayed. The thick black bar in the middle represents the quartile range, the fine black line extending from it represents the 95% confidence interval, and the white point is the median.
4) Double feature box
sn.boxplot (data = train, x = "yr, y =" CNT ") ා, also known as box graph, box graph or box line graph, is a statistical graph used to display a group of data dispersion information. It shows the order from top to bottom: abnormal value (may not exist), maximum value, upper quartile, median, lower quartile, minimum value, abnormal value (sometimes not, if any, pay special attention).
5) Double characteristic bar chart
fig,(ax1,ax2) = plt.subplots (ncols = 2) one canvas, two axes
sn.barplot (data = train, x =, y =, CNT, hue =, ax = ax1) hue =, differentiate by weathersit
sn.barplot (data = train, x = workingday, y = cnt, hue = season, ax = AX2) × (hue = season), distinguished by season
6) Double characteristic line chart
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 thermograph
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
sn.scatterplot (x= train.GrLivArea Y= train.SalePrice )
plt.title ("looking for outliers") (drawing title)
plt.show ()