EL之RF(RFR):利用RF对回归(性别属性编码)问题(整数值年龄预测)建模

 

 

目录

输出结果

设计思路

核心代码


 

 

 

输出结果

EL之RF(RFR):利用RF对回归(性别属性编码)问题(整数值年龄预测)建模_DataScienceEL之RF(RFR):利用RF对回归(性别属性编码)问题(整数值年龄预测)建模_Algorithm_02EL之RF(RFR):利用RF对回归(性别属性编码)问题(整数值年龄预测)建模_EL_03

 

设计思路

EL之RF(RFR):利用RF对回归(性别属性编码)问题(整数值年龄预测)建模_ML_04

EL之RF(RFR):利用RF对回归(性别属性编码)问题(整数值年龄预测)建模_ML_05

 

核心代码

for iTrees in nTreeList:
    depth = None
    abaloneRFModel = ensemble.RandomForestRegressor(n_estimators=iTrees, max_depth=depth, max_features=maxFeat,
                                                 oob_score=False, random_state=531)

    abaloneRFModel.fit(xTrain,yTrain)

    prediction = abaloneRFModel.predict(xTest)
    mseOos.append(mean_squared_error(yTest, prediction))

 

 

更多文章请关注《万象专栏》