Commit f2cef298 authored by linfang.wang's avatar linfang.wang

加入测试数据

parent 9763c9e6
......@@ -35,13 +35,13 @@ def liftchart(df,x,y,classes='',bin=10,title='',xlabel='',ylabel=''):
plt.subplot(2, 1,1)
draw_lineplot(df_out,'grid','mean',hue=classes,title=title,xlabel=xlabel,ylabel=ylabel)
plt.subplot(2, 1, 2)
draw_lineplot(df_out,'grid','acmEventRate',hue=classes,title=title,xlabel=xlabel,ylabel=ylabel)
draw_lineplot(df_out,'grid','acmMean',hue=classes,title=title,xlabel=xlabel,ylabel=ylabel)
else :
df_out = datacal.cal_accume(df, x, y, bin)
plt.subplot(2, 1, 1)
draw_lineplot(df_out, 'grid','mean', title=title, xlabel=xlabel, ylabel=ylabel)
plt.subplot(2, 1, 2)
draw_lineplot(df_out, 'grid','acmEventRate', title=title, xlabel=xlabel, ylabel=ylabel)
draw_lineplot(df_out, 'grid','acmMean', title=title, xlabel=xlabel, ylabel=ylabel)
plt.tight_layout()
# plt.show()
return plt
......@@ -56,7 +56,6 @@ def univarchart(df,x,y,bin=10,classes='',title='',xlabel='',ylabel=''):
'''
plt.cla()
plt.subplot(1, 1, 1)
if classes !='':
df_out = datacal.cal_univar(df, x, y, bin, classes=[classes])
draw_lineplot(df_out,'grid','mean',hue=classes,title=title,xlabel=xlabel,ylabel=ylabel)
......
......@@ -49,4 +49,5 @@ if __name__ == '__main__':
label='y'
df=pd.read_csv('test.csv')
dftrain,dftest=datacal.split_train_val(df,trainsplit='timeSeries',trainsplitRatio=0.8,sort_col='applied_at')
xgbreport.report(dftrain,dftest,features,label,'','tmp.doc')
\ No newline at end of file
xgbreport.report(dftrain,dftest,features,label,'','tmp.doc')
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment