def evaluate_decision_tree_regression(X, y):
tree = DecisionTreeRegressor(max_depth=3)
tree.fit(X, y)
sort_index = X.flatten().argsort()
lin_regplot(X[sort_index], y[sort_index], tree)
plt.xlabel('% lower status of the population [LSTAT]')
plt.ylabel("Price in $1000's [MEDV]")
plt.show()
chapter_10.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录