python随机森林代码

from time import time
from sklearn.ensemble import RandomForestRegressor
from sklearn.model_selection import train_test_split
import numpy as np
from sklearn.metrics import mean_squared_error

data = np.loadtxt('C:/Users/Administrator.DESKTOP-BT0S13O/Desktop/数据1.csv',delimiter=',')
(括号内是路径文件)

RON = data[:,0]
factors = data[:,1:]
t0 = time()
forest= RandomForestRegressor(n_estimators=500,random_state=0,max_features=100,n_jobs=2)

X_train,X_test,y_train,y_test = train_te

python随机森林代码最先出现在Python成神之路

版权声明:
作者:倾城
链接:https://www.techfm.club/p/4045.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>