📜  随机森林回归器 python 代码示例

📅  最后修改于: 2022-03-11 14:46:07.438000             🧑  作者: Mango

代码示例1
from sklearn.ensemble import RandomForestRegressor


clf = RandomForestRegressor(max_depth=2, random_state=0)

clf.fit(X, y)

print(clf.predict([[0, 0, 0, 0]]))