-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dataset returning non-stationary process #3
Comments
Some quick code-to-code comparisons in Octave show the following:
Conclusions:
|
Lastly, previous comment data was shown at |
I've added a verbatim copy of Collomb's original code as issue3.cpp. Running
permits comparison with
and should ideally produce nearly identical results. They differ a digit or two earlier than I suspect they should. Moreover, the former is closer to |
I believe I can explain the discrepancy between
instead of the expression in c42b623 causes
to show no difference in the numerical outputs. Both
|
Using the newer |
Using only
matches to every last digit. My implementation of Collomb's material no longer feels suspect. I now need to check Collomb's implementation, as embodied in |
I documented how to find process poles in 0340adb. With this procedure, Collomb's implementation is indeed suspect as
Compare that with Collomb's approach as implemented in
This clearly is a nonstationary result from Collomb's algorithm because there are poles outside the unit circle. phew This bug has origins in a bad algorithm writeup by Collomb and not in some subtle bit of my implementation, I think. I need to determine what it is about Collomb's algorithm that differs from |
I have attempted to contact Cedrick Collomb. Will update when he gets back to me if not before. |
Using a hacked up (but numerically identical) version of Octave's
This will serve as the gold solution for debugging whatever's up with Collomb's implementation. |
Hardcoding the |
Renamed issue3.cpp to collomb2009.cpp. Added a copy of Faber1986's code as faber1986.cpp. Makefile now builds both. README updates pointing out the numerical instability. New references to the literature re: the algorithmic variant.
Turns out that Collomb's implementation, now renamed to
Found the smoking gun. On page 1582, [Andersen1978] says
[Andersen1978]'s motivation was avoiding some FLOPS during computation of the reflection coefficient. A reasonable implementation of the vanilla, non-recursive-denominator algorithm should be able to continue working with a single pass through memory and obtain good performance on modern systems even without this unstable optimization. To close this whole mess out, I plan to:
I will then file a new issue capturing that
|
burg_method now updated with stable version Documentation updates Testing remains but basic stuff looks half sane
c3fd620 temporarily turns off the compensated reflection coefficient computation, and it nails the Octave |
I suspect that the compensated version of this routine is correct, mainly because it is simple enough that I can eyeball it. Still, substituting in a non-compensated version should show behavior identical to Octave's arburg.
08615f9 closes the ticket. |
Nick has found an input data set, saved as file issue3.dat, which results in a nonstationary AR(p) process when fed into arsel:
The nonstationarity manifests itself in a
NaN
in the T0. Investigating the AR(p) process poles shows that some are larger than one in absolute value. Algorithmically, I do not believe this should be possible with Burg's method and hence something is amiss.The text was updated successfully, but these errors were encountered: