Goodness of fit tests in SciPy

丶灬走出姿态 提交于 2019-12-18 04:39:09

问题


I'm new to Python and coming from the R world. I'm trying to fit distributions to sample data using SciPy and having good success. I can make distribution.fit(data) return sane results. What I've been unable to do is create the goodness of fit statistics which I'm used to with the fitdistrplus package in R. Is there a common method for comparing "best fit" from a number of different distributions with SciPy?

I'm looking for something like the Kolmogorov-Smirnov test or Cramer-von Mises or Anderson-darling tests


回答1:


There's also statmodels goodness of fit tests.




回答2:


See the scipy.stats library: http://docs.scipy.org/doc/scipy/reference/stats.html

It contains K-S and Anderson-Darling, although apparently not Cramer-von Mises.



来源:https://stackoverflow.com/questions/11268632/goodness-of-fit-tests-in-scipy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!