6isotonic_regression.py 文件源码

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

项目:Machine-Learning-Algorithms 作者: PacktPublishing 项目源码 文件源码
def show_isotonic_regression_segments(X, Y, Yi, segments):
    lc = LineCollection(segments, zorder=0)
    lc.set_array(np.ones(len(Y)))
    lc.set_linewidths(0.5 * np.ones(nb_samples))

    fig, ax = plt.subplots(1, 1, figsize=(30, 25))

    ax.plot(X, Y, 'b.', markersize=8)
    ax.plot(X, Yi, 'g.-', markersize=8)
    ax.grid()
    ax.set_xlabel('X')
    ax.set_ylabel('Y')

    plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号