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()
6isotonic_regression.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录