__init__.py 文件源码

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

项目:mlprojects-py 作者: srinathperera 项目源码 文件源码
def print_graph(X_all, X_test, y_all, y_pred1, y_pred2):
    training_size = X_all.shape[0] - X_test.shape[0]
    x_full_limit = np.linspace(1, X_all.shape[0], X_all.shape[0])
    y_pred_limit = np.linspace(training_size+1, training_size + 1 + X_test.shape[0], X_test.shape[0])
    plt.plot(x_full_limit, y_all, label='actual', color='b', linewidth=1)
    plt.plot(y_pred_limit, y_pred1, '--', color='r', linewidth=2, label='prediction1')
    plt.plot(y_pred_limit, y_pred2, '--', color='g', linewidth=2, label='prediction2')
    plt.legend(loc=0)
    plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号