learner.py 文件源码

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

项目:icing 作者: slipguru 项目源码 文件源码
def plot_learning_function(xdata, ydata, yerr, order, aplot, poly):
    with sns.axes_style('whitegrid'):
        sns.set_context('paper')
        xp = np.linspace(np.min(xdata), np.max(xdata), 1000)[:, None]
        plt.figure()
        plt.errorbar(xdata, ydata, yerr,
                     label='Nearest similarity', marker='s')
        plt.plot(xp, poly(xp), '-',
                 label='Learning function (poly of order {})'.format(order))
        # plt.plot(xp, least_squares_mdl(res.x, xp), '-', label='least squares')
        plt.xlabel(r'Mutation level')
        plt.ylabel(r'Average similarity (not normalised)')
        plt.legend(loc='lower left')
        plt.savefig(aplot, transparent=True, bbox_inches='tight')
        plt.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号