EL之GB(GBM):利用GB对回归(性别属性编码+调2参)问题(整数值年龄预测)建模
生活随笔
收集整理的這篇文章主要介紹了
EL之GB(GBM):利用GB对回归(性别属性编码+调2参)问题(整数值年龄预测)建模
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
EL之GB(GBM):利用GB對(duì)回歸(性別屬性編碼+調(diào)2參)問題(整數(shù)值年齡預(yù)測(cè))建模
?
?
?
目錄
輸出結(jié)果
設(shè)計(jì)思路
核心代碼
?
?
?
輸出結(jié)果
T1、
T2、
設(shè)計(jì)思路
?
核心代碼
#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.5abaloneGBMModel = 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))?
?
?
?
?
總結(jié)
以上是生活随笔為你收集整理的EL之GB(GBM):利用GB对回归(性别属性编码+调2参)问题(整数值年龄预测)建模的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 成功解决AttributeError:
- 下一篇: DL之GoogleNet:GoogleN