def predict_test_prob(lgbm):
df_all=loadCSV('data/first_merge/test_join_v9.csv')
df_sta_xgb=loadCSV('data/stacking/prob_xgb_test.csv')
print('????')
df_all=pd.merge(df_all,df_sta_xgb,how='left',on='instanceID')
del df_sta_xgb
instanceID=df_all.instanceID.values
feature_all=df_all.drop(['label','clickTime','instanceID',
'residence','appCategory'],axis=1).values
prob = lgbm.predict(feature_all, num_iteration=lgbm.best_iteration)
output=pd.DataFrame({'instanceID':instanceID,'prob':prob})
output.to_csv('result/submission.csv',index=False)
#????
LightGBMExam.py 文件源码
python
阅读 28
收藏 0
点赞 0
评论 0
评论列表
文章目录