plotdistributions.py 文件源码

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

项目:Events-in-Text 作者: CrowdTruth 项目源码 文件源码
def plot_distributions(sortedlist, title):
    fit = stats.norm.pdf(sortedlist, np.mean(sortedlist), np.std(sortedlist))  #this is a fitting indeed
    pl.title(title)
    pl.plot(sortedlist,fit,'-o')

    pl.hist(sortedlist,normed=True)      #use this to draw histogram of your data
    pl.savefig(title)
    pl.show()                   #use may also need add this
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号