xgboost 保存模型和特征重要度
2017-10-16 21:44
1731 查看
1. 保存模型:
(1)保存:
source from:
http://blog.csdn.net/zc02051126/article/details/46771793
2.xgb 打印特征重要度:
使用f1 score来打分
import pandas as pd
import matplotlib.pylab as plt
feat_imp = pd.Series(clf.booster().get_fscore()).sort_values(ascending=False)
feat_imp.plot(kind='bar', title='Feature Importances')
plt.ylabel('Feature Importance Score')
plt.show()来自,余音大神的blog: http://blog.csdn.net/q383700092/article/details/53763328
(1)保存:
bst.save_model('0001.model')(2)加载模型:
bst_new = xgb.Booster({'nthread':4}) #init model bst_new.load_model("0001.model") # load data
source from:
http://blog.csdn.net/zc02051126/article/details/46771793
2.xgb 打印特征重要度:
使用f1 score来打分
import pandas as pd
import matplotlib.pylab as plt
feat_imp = pd.Series(clf.booster().get_fscore()).sort_values(ascending=False)
feat_imp.plot(kind='bar', title='Feature Importances')
plt.ylabel('Feature Importance Score')
plt.show()来自,余音大神的blog: http://blog.csdn.net/q383700092/article/details/53763328
相关文章推荐
- XGBoost 模型保存,读取
- Xgboost筛选特征重要性
- XGBOOST + LR 模型融合 python 代码
- xgboost gbdt特征点分烈点位置
- 百度DMLC分布式深度机器学习开源项目(简称“深盟”)上线了如xgboost(速度快效果好的Boosting模型)、CXXNET(极致的C++深度学习库)、Minerva(高效灵活的并行深度学习引擎)以及Parameter Server(一小时训练600T数据)等产品,在语音识别、OCR识别、人脸识别以及计算效率提升上发布了多个成熟产品。
- 百度DMLC分布式深度机器学习开源项目(简称“深盟”)上线了如xgboost(速度快效果好的Boosting模型)、CXXNET(极致的C++深度学习库)、Minerva(高效灵活的并行深度学习引擎)以及Parameter Server(一小时训练600T数据)等产品,在语音识别、OCR识别、人脸识别以及计算效率提升上发布了多个成熟产品。
- xgboost: 速度快效果好的boosting模型
- 使用xgboost进行特征选择
- 基于Python的Xgboost模型实现
- [置顶] 【数据挖掘 xgboost】特征的重要程度分析
- XGBoost Plotting API以及GBDT组合特征实践
- xgboost特征工程--探索数据集的基本信息
- xgboost: 速度快效果好的boosting模型
- 利用xgboost4j下的xgboost分类模型案例
- machine learning in coding(python):使用xgboost构建预测模型
- XGBoost Plotting API以及GBDT组合特征实践
- xgboost调用sklearn的交叉验证,并且使用自定义的训练集、验证集进行模型的调参
- 树模型的学习----XGBOOST的学习
- xgboost: 速度快效果好的 boosting 模型
- 关于树的几个ensemble模型的比较(GBDT、xgBoost、lightGBM、RF)