您当前的位置: 首页 >  回归
  • 0浏览

    0关注

    2393博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

EL之GB(GBM):利用GB对回归(性别属性编码+调2参)问题(整数值年龄预测)建模

一个处女座的程序猿 发布时间:2019-01-12 21:21:57 ,浏览量:0

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))

 

 

 

 

 

关注
打赏
1664196048
查看更多评论
立即登录/注册

微信扫码登录

0.0909s