答:Pettitt 突变检验的代码如下:from scipy import statsdef pettitt_test(x): n = len(x) x_mean = np.mean(x) s_plus = 0 s_minus = 0 for i in range(1,n): if x[i] > x[i-1]: s_plus += x[i] - x[i-1] else: s_minus += x[i-1] - x[i] U = s_plus - s_minus
请写一个pettitt 突变检验的代码
最新推荐文章于 2023-03-26 13:59:01 发布