chapter_10.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:python-machine-learning-book 作者: jeremyn 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号