# train = data[data.label!=-1]
# test = data[data.label==-1]
# train = train.dropna()
# test = test.dropna()
# # for i in data.columns:
# for i in ['city','lan', 'os', 'osv', 'ver', 'orientation', 'carrier', 'ntt', 'make']:
# try:
# g = sns.kdeplot(train[i], color="Red", shade = True)
# g = sns.kdeplot(test[i], ax =g, color="Blue", shade= True)
# g.set_xlabel(i)
# g.set_ylabel("Frequency")
# g = g.legend(["train","test"])
# tmp = 'train_test_' + i
# plt.savefig('./train_test/%s.jpg'%tmp)
# plt.show()
# print('plot over:%s'%i)
# except:
# print('jump %s'%i)
# #强特变量:adidmd5 imeimd5 ip macmd5(稍微不一样)
数据挖掘-训练集、测试集绘制&保存
最新推荐文章于 2023-02-12 12:20:45 发布