ML之xgboost:基于xgboost(5f-CrVa)算法对HiggsBoson数据集(Kaggle竞赛)训练(模型保存+可视化)实现二分类预测 - Go语言中文社区

ML之xgboost:基于xgboost(5f-CrVa)算法对HiggsBoson数据集(Kaggle竞赛)训练(模型保存+可视化)实现二分类预测


ML之xgboost:基于xgboost(5f-CrVa)算法对HiggsBoson数据集(Kaggle竞赛)训练(模型保存+可视化)实现二分类预测

 

 

目录

数据集简介

输出结果

设计思路

核心代码


 

 

 

 

数据集简介

Dataset之HiggsBoson:Higgs Boson(Kaggle竞赛)数据集的简介、下载、案例应用之详细攻略

 

 

输出结果

更新中……

1、交叉训练时间比较长,大约需要20多分钟。

 

 

 

设计思路

更新中……

 

 

核心代码

更新中……

num_round = 1000                      
n_estimators = cvresult.shape[0]     
print ('running cross validation, with preprocessing function')

# do cross validation, for each fold
# the dtrain, dtest, param will be passed into fpreproc
# then the return value of fpreproc will be used to generate results of that fold
cvresult = xgb.cv(param, dtrain, num_round, nfold=5,     
                  metrics={'ams@0.15', 'auc'},         
                  early_stopping_rounds=10, seed = 0, 
                  fpreproc = fpreproc)                     
print ('finish cross validation','n',cvresult)   


print ('train model using the best parameters by cv ... ')
bst = xgb.train( param, dtrain, n_estimators )                        
bst.save_model('data_input/xgboost/data_higgsboson/higgs_cv.model')  

 

 

 

 

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/qq_41185868/article/details/90812881
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-03-08 16:06:23
  • 阅读 ( 1706 )
  • 分类:算法

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢