刚刚发现这个包 https://launchpad.net/python-spc/+milestone/0.3它已经有一段时间没有更新了,但到目前为止可以在 Python 2.7.3 中运行(在 64 位 Windows 7 上,使用相当最新的支持包):
In [1]: import spc
In [2]: import matplotlib.pyplot as plt
In [3]: x = [25,19,14,17,25,39,49,6,11,19,13,26,24,32,14,19]
In [4]: cc = spc.Spc(x, spc.CHART_X_MR_X)
In [5]: cc.get_chart()
In [6]: plt.show()
看起来第6个点超出了控制上限……
In [7]: cc.get_violating_points()
Out[7]: {'1 beyond 3*sigma': [6]}
套餐基本都是单个的init.py 文件只有几百行源代码,并且希望实现十多个图表,包括 CUSUM。
最后,有一个github项目值得关注:https://github.com/bwghughes/controlchart https://github.com/bwghughes/controlchart