EL之GB(GBM):利用GB对回归(性别属性编码+调2参)问题(整数值年龄预测)建模
生活随笔
收集整理的這篇文章主要介紹了
EL之GB(GBM):利用GB对回归(性别属性编码+调2参)问题(整数值年龄预测)建模
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
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.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))?
?
?
?
?
總結
以上是生活随笔為你收集整理的EL之GB(GBM):利用GB对回归(性别属性编码+调2参)问题(整数值年龄预测)建模的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 成功解决AttributeError:
- 下一篇: DL之GoogleNet:GoogleN