evaluation.py 文件源码

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

项目:syracuse_public 作者: dssg 项目源码 文件源码
def plot_score_distribution(y_pred, so):
    """ Plots scores of predicted values """
    min_x = min(min(y_pred), 0)
    max_x = max(max(y_pred), 1)
    sns.distplot(y_pred, kde=False)
    plt.title("distribution of scores for {} model".format(so['model_name']))
    plt.xlabel("raw prediction score")
    plt.xlim([min_x, max_x])
    plt.ylabel("number of street segments")
    base = so['results_dir'] + so['model_name'] + "_" + \
        str(so['timestamp']) + "_" + so['break_window']
    plt.savefig(base + '_score_distribution.png', bbox_inches='tight')
    plt.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号