對數(shù)據(jù)標簽進行統(tǒng)計迎变,發(fā)現(xiàn)樣本不均衡問題宁仔”统耍可能采取降采樣或者過采樣方式來解決該問題锤悄。
進行了特征相關(guān)性分析,取與標簽相關(guān)性大于0.5的特征做熱力圖嘉抒。發(fā)現(xiàn)單個屬性與標簽關(guān)聯(lián)性不大零聚。
代碼:
threshold=0.5
corrmat=train.corr()
top_corr_features=corrmat.index[abs(corrmat['label'])>threshold]
plt.figure(figsize=(10,10))
g=sns.heatmap(train[top_corr_features].corr(),annot=True,cmap="RdYlGn")
熱力圖如下:
對當行數(shù)據(jù)的折線圖進行分析:
當標簽為0時:
標簽為1時:
標簽為2時:
標簽為3時: