EL之RF(RFR):利用RandomForestRegressor对回归问题(实数值评分预测)建模(调2参)
生活随笔
收集整理的這篇文章主要介紹了
EL之RF(RFR):利用RandomForestRegressor对回归问题(实数值评分预测)建模(调2参)
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
EL之RF(RFR):利用RandomForestRegressor對(duì)回歸問題(實(shí)數(shù)值評(píng)分預(yù)測)建模(調(diào)2參)
?
目錄
輸出結(jié)果
設(shè)計(jì)思路
核心代碼
?
?
?
輸出結(jié)果
?
設(shè)計(jì)思路
?
核心代碼
mseOos = [] nTreeList = range(100, 1000, 100) #----▲☆▲☆▲ for iTrees in nTreeList: # depth = None # depth=6 #----▲▲▲▲▲depth=10 #----☆☆☆☆maxFeat = 4 #try tweakingwineRFModel = ensemble.RandomForestRegressor(n_estimators=iTrees, max_depth=depth, max_features=maxFeat,oob_score=False, random_state=531)wineRFModel.fit(xTrain,yTrain)prediction = wineRFModel.predict(xTest)mseOos.append(mean_squared_error(yTest, prediction))?
?
?
《新程序員》:云原生和全面數(shù)字化實(shí)踐50位技術(shù)專家共同創(chuàng)作,文字、視頻、音頻交互閱讀總結(jié)
以上是生活随笔為你收集整理的EL之RF(RFR):利用RandomForestRegressor对回归问题(实数值评分预测)建模(调2参)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: EL之RF(随机性的Bagging+DT
- 下一篇: EL之GB(GBR):利用GBR对回归问