我想在Python中找出一種方法,基於滾動標準偏差中的跳轉,如何識別事件何時發生。基於Python中的滾動差異跳轉識別事件
如下圖所示,在第12000個樣本中,出現event
。在我的Python腳本中,我目前使用閾值0.00051
來表示該事件何時發生。然而,有時event
出現在0.0005
和其他時間event
發生在0.000495
。
我的問題是 - 我怎樣才能算法,在Python中,檢測到這一跳在滾動標準偏差以創建事件altert?因爲如果我的門檻太低,我不希望太早觸發它。如果我運行另一個測試,並且閾值太高,那麼我不希望事件不會被觸發。
任何意見非常感謝!
def animate(i):
data = pd.read_csv("C:\\Users\\Desktop\\data.txt", sep="\[|\]\[|\]",engine = 'python', header = None)
data = data.iloc[0, ::4]
data = data.astype(str).apply(lambda x: x.split(',')[-1]).astype(float)
data.pop(0)
xar = range(len(data))
yar = pd.DataFrame(data)
# Starting from sample 1050 to get rid of any initial noise
yar = yar[1050:12500]
xar = xar[1050:12500]
std = yar.rolling(window=2500).std()
if (np.any(std>.00051)):
choices = ["Confirm Event"]
reply = easygui.buttonbox("Event Alert!, image, choices)
if reply == "Confirm Event":
sys.exit(0)
ax1.clear()
ax1.plot(xar,std)
ax1.set_title('Rolling Standard Deviation')
fig, (ax1) = plt.subplots(1, sharex = True)
ani = animation.FuncAnimation(fig, animate, interval=.01)
plt.show()
編輯瓦特/代碼
import pandas as pd
import scipy
import sys
import numpy as np
import easygui
import matplotlib.pyplot as plt
import matplotlib.animation as animation
def animate(i):
data = pd.read_csv("C:\\Users\\Desktop\\data.txt", sep="\[|\]\[|\]",engine = 'python', header = None)
data = data.iloc[0, ::4]
data = data.astype(str).apply(lambda x: x.split(',')[-1]).astype(float)
data.pop(0)
xar = range(len(data))
#yar = data.as_matrix()
yar = pd.DataFrame(data)
L=2500
# Starting from sample 1050 to get rid of any initial noise
yar = yar[1050:len(data)]
xar = xar[1050:len(data)]
std = yar.rolling(window=2500).std()
std = std.as_matrix()
#s = [np.std(yar[ii:ii+L]) for ii in range(1050,len(data))]
yar = data.as_matrix()
yar = yar[1050:len(data)]
d = np.diff(yar)
d2 = d*d
## rolling mean of the diff squared:
SS = [np.mean(d2[ii:ii+L]) for ii in range(1050, len(d2)-L)]
# compute the F statistic
F = np.array([SS[ii]/SS[ii+L] for ii in range(1050, len(SS)-L)])
w = np.where(np.less(F,1))
F[w]=1/F[w]
# the x coordinate of the point where shift happens is offset by L from the computed F:
xi = np.arange(0,len(F))+L
ax1.clear()
ax2.clear()
ax3.clear()
ax1.plot(xar, std)
ax2.plot(xi, F)
ax3.plot(xar, yar)
ax1.set_title('Rolling Standard Deviation')
ax2.set_title('F - values')
ax3.set_title('Original Data')
fig, (ax1, ax2, ax3) = plt.subplots(3, sharex = True)
fig.subplots_adjust(hspace=1.5)
ani = animation.FuncAnimation(fig, animate, interval=.01)
plt.show()
我的數據如下所示:
[0.013671875, -0.9599609375, -0.005859375][0.013671875, -0.9599609375, -0.005859375][0.013671875, -0.9599609375, -0.005859375][0.0068359375, -0.8193359375, -0.0029296875][0.0068359375, -0.8193359375, -0.0029296875][0.0068359375, -0.8193359375, -0.0029296875][0.0068359375, -0.8193359375, -0.0029296875][0.0068359375, -0.8193359375, -0.0029296875][0.0068359375, -0.8193359375, -0.0029296875][0.0068359375, -0.8193359375, -0.0029296875][0.0068359375, -0.8193359375, -0.0029296875][0.0087890625, -0.990234375, -0.0048828125][0.0087890625, -0.990234375, -0.0048828125][0.0087890625, -0.990234375, -0.0048828125][0.0087890625, -0.990234375, -0.0048828125][0.0087890625, -0.990234375, -0.0048828125][0.0087890625, -0.990234375, -0.0048828125][0.0068359375, -0.951171875, -0.00390625][0.0068359375, -0.951171875, -0.00390625][0.0068359375, -0.951171875, -0.00390625][0.0068359375, -0.951171875, -0.00390625][0.0068359375, -0.951171875, -0.00390625][0.0068359375, -0.951171875, -0.00390625][0.0068359375, -0.951171875, -0.00390625][0.0068359375, -0.951171875, -0.00390625][0.009765625, -0.9560546875, -0.0048828125][0.009765625, -0.9560546875, -0.0048828125][0.009765625, -0.9560546875, -0.0048828125][0.009765625, -0.9560546875, -0.0048828125][0.009765625, -0.9560546875, -0.0048828125][0.009765625, -0.9560546875, -0.0048828125][0.009765625, -0.9560546875, -0.0048828125][0.009765625, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0068359375, -0.9560546875, -0.0048828125][0.0068359375, -0.9560546875, -0.0048828125][0.0068359375, -0.9560546875, -0.0048828125][0.0068359375, -0.9560546875, -0.0048828125][0.0068359375, -0.9560546875, -0.0048828125][0.0068359375, -0.9560546875, -0.0048828125][0.0068359375, -0.9560546875, -0.0048828125][0.0068359375, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.005859375][0.0087890625, -0.9560546875, -0.005859375][0.0087890625, -0.9560546875, -0.005859375][0.0087890625, -0.9560546875, -0.005859375][0.0087890625, -0.9560546875, -0.005859375][0.0087890625, -0.9560546875, -0.005859375][0.0087890625, -0.9560546875, -0.005859375][0.0087890625, -0.9560546875, -0.005859375][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0087890625, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0087890625, -0.955078125, -0.0048828125][0.0087890625, -0.955078125, -0.0048828125][0.0087890625, -0.955078125, -0.0048828125][0.0087890625, -0.955078125, -0.0048828125][0.0087890625, -0.955078125, -0.0048828125][0.0087890625, -0.955078125, -0.0048828125][0.0087890625, -0.955078125, -0.0048828125][0.0087890625, -0.955078125, -0.0048828125][0.0068359375, -0.9560546875, -0.00390625][0.0068359375, -0.9560546875, -0.00390625][0.0068359375, -0.9560546875, -0.00390625][0.0068359375, -0.9560546875, -0.00390625][0.0068359375, -0.9560546875, -0.00390625][0.0068359375, -0.9560546875, -0.00390625][0.0068359375, -0.9560546875, -0.00390625][0.0068359375, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0078125, -0.955078125, -0.00390625][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0087890625, -0.9560546875, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.955078125, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.00390625][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125][0.0078125, -0.9560546875, -0.0048828125]
是事件相當罕見?您可以在興趣點前後進行N個點的直線擬合 - 當斜率發生變化時,擬合效果最好。如果坡度的變化發生得早或晚,則配合會變差。這意味着一個「合適的善良」的陰謀將有一個明確的最低限度。這會有幫助嗎? – Floris
是的,該事件只發生一次。你知道一個與你所描述的內容類似的例子嗎? – Gary
我會創建一個例子。你能否給出更多關於如何計算滾動標準偏差的背景?平均有多少個數據點? 「事件」有何不同 - 它是源數據中的單一點還是數據中的噪聲變化? – Floris