所以我读到可以将 AR 模型拟合到 EEG 数据,然后使用 AR 系数作为对数据进行聚类或分类的特征:例如 Mohammadi 等人,使用 AR 模型进行 EEG 信号的人员识别,2006 年。
作为质量控制步骤和解释的帮助,我想直观地看到拟合模型产生/模拟的时间序列类型。如果我正在做 K 均值或其他分类,这也将允许我展示原型模型。
然而,我似乎能够产生的只是噪音!
朝着我想要的方向迈出的任何一步都将受到欢迎。
section1 = data[88000:91800]
section2 = data[0:8000]
section3 = data[143500:166000]
section1 -= np.mean(section1)
section2 -= np.mean(section2)
section3 -= np.mean(section3)
绘制时:
maxOrder = 20
model_one = AR(section1).fit(maxOrder, ic = 'aic', trend = 'nc')
model_two = AR(section2).fit(maxOrder, ic = 'aic', trend = 'nc')
model_three = AR(section3).fit(maxOrder, ic = 'aic', trend = 'nc')
fake1 = arma_generate_sample(model_one.params,[1],1000, sigma = 1)
fake2 = arma_generate_sample(model_two.params,[1],1000,sigma = 1)
fake3 = arma_generate_sample(model_three.params,[1],1000,sigma = 1)
ax1.plot(fake1)
ax2.plot(fake2)
ax3.plot(fake3)