我试着用指数分布来拟合数据集。奇怪的是,无论我做什么,我似乎都无法缩放直方图,使之适合指数分布。在
param=expon.fit(data)
pdf_fitted=norm.pdf(x,loc=param[0],scale=param[1])
plot(x,pdf_fitted,'r-')
hist(constraint1N55, normed=1,alpha=.3,histtype='stepfilled')
由于某种原因,直方图占用的空间比概率分布要大得多,尽管我赋范了=1。我能做些什么使事情更合适吗?在
Tags:
你犯了个错误。您拟合了指数,但绘制了正态分布:
正确绘制时,数据看起来不错:
相关问题 更多 >
编程相关推荐