如果您的信号可靠平滑,您可能只需查看每次试验的自相关函数,然后选择设置顺序作为 ACF 开始衰减时的滞后。
autocorr(Y);
如果您想获得更量化的拟合(这可能比目测和概括 129 个信号更容易)。你可以拟合一个 AR 模型
您要做的第一件事是选择要评估的定单范围(我会查看 ACF 中的几个信号,然后选择 ACF 中相对没有信号的定单)。
bounds = 1:12; % Order bounds
现在您将遍历每个订单可能性并计算 AIC、BIC。较低的值 == 更适合。
for p = bounds
myModel = arima(p,0,0); % no moving average (I'm not sure about no MA...)
for sig_ind = 1:size(sig_mat,2)
% Get the log likelihoods
[~,~,LL(p,sig_ind)]= estimate(myModel,sig_mat(:,sig_ind));
end
end
for sig_ind = 1:size(sig_mat,2)
[aic(sig_ind,:),bic(sig_ind,:)] = aicbic(LL(:,sig_ind),bounds,size(sig_mat,1));
end
现在您有了想要选择最低的 BIC 分数。
在这种情况下,我使用信号的平均值,如果你想
真的很小心,我会查看分布并选择一个低
分布紧密的中位数。您也可以使用 AIC 进行评估。
[~,order_ind] = min(mean(bic,1));
order = bound(order_ind);