EL之GB(GBM):利用GB对回归(性别属性编码+调2参)问题(整数值年龄预测)建模
【摘要】 EL之GB(GBM):利用GB对回归(性别属性编码+调2参)问题(整数值年龄预测)建模
目录
输出结果
设计思路
核心代码
输出结果
T1、
T2、
设计思路
核心代码
#T1nEst = 2000depth = 5learnRate = 0.003maxFeatures = Nonesubsam...
EL之GB(GBM):利用GB对回归(性别属性编码+调2参)问题(整数值年龄预测)建模
目录
输出结果
T1、
T2、
设计思路
核心代码
-
#T1
-
nEst = 2000
-
depth = 5
-
learnRate = 0.003
-
maxFeatures = None
-
subsamp = 0.5
-
-
#T2
-
# nEst = 2000
-
# depth = 5
-
# learnRate = 0.005
-
# maxFeatures = 3
-
# subsamp = 0.5
-
-
-
abaloneGBMModel = ensemble.GradientBoostingRegressor(n_estimators=nEst, max_depth=depth,
-
learning_rate=learnRate, max_features=maxFeatures,
-
subsample=subsamp, loss='ls')
-
-
abaloneGBMModel.fit(xTrain, yTrain)
-
-
# compute mse on test set
-
msError = []
-
predictions = abaloneGBMModel._staged_decision_function(xTest)
-
for p in predictions:
-
msError.append(mean_squared_error(yTest, p))
文章来源: yunyaniu.blog.csdn.net,作者:一个处女座的程序猿,版权归原作者所有,如需转载,请联系作者。
原文链接:yunyaniu.blog.csdn.net/article/details/86377011
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)