xgboost使用
来源:互联网 发布:阿里云mx记录值 编辑:程序博客网 时间:2024/06/05 07:51
from sklearn.ensemble import GradientBoostingClassifierfrom sklearn import cross_validation, metricsfrom sklearn.model_selection import cross_val_scorefrom sklearn.tree import DecisionTreeRegressorimport sklearn.preprocessingfrom sklearn import linear_modelfrom sklearn.preprocessing import ImputerX_train, X_test, y_train, y_test = cross_validation.train_test_split(X, y, test_size=0.3, random_state=198)print(X_train.shape, X_test.shape)xlf = xgb.XGBRegressor(max_depth=10, learning_rate=0.1, n_estimators=10, silent=True, objective='reg:linear', nthread=-1,gamma=0,min_child_weight=1, max_delta_step=0, subsample=0.85, colsample_bytree=0.7, colsample_bylevel=1, reg_alpha=0, reg_lambda=1,scale_pos_weight=1,seed=1440,missing=None)xlf.fit(X_train, y_train, eval_metric='rmse', verbose = True, eval_set = [(X_test, y_test)],early_stopping_rounds=100)
阅读全文
0 0
- xgboost使用
- XGBoost:在Python中使用XGBoost
- XGBoost:在Python中使用XGBoost
- XGBoost:在Python中使用XGBoost
- xgboost使用调参
- xgboost使用案例一
- xgboost使用案例二
- xgboost使用小结
- xgboost 包使用
- xgboost使用步骤
- xgboost使用案例一
- xgboost使用入门
- R --xgboost使用
- Xgboost原理及使用
- Rstudio安装使用xgboost
- Xgboost使用问题集锦
- XGBoost使用之安装
- xgboost的使用简析
- 2017-11-28
- Mybatis+Spring整合
- 哈希表(散列表)原理详解
- jquery 对 Json 的各种遍历
- CentOS7安装GnomeUI图形界面
- xgboost使用
- Linux进程间通信
- python学习总结---for循环
- 深度学习5:python实现三层神经网络
- Android Studio生成签名文件AND用正式签名进行调试
- HDU
- JS操作cookie的方法
- VMware安装centos虚拟机 通过NAT与主机互通并能上网
- Oracle 自定义函数