Closed mih closed 6 years ago
@AdinaWagner does that ring a bell re the other work of that group that you have read?
@mih no, never came across this in all other studies I read. Will check in their book tomorrow
The solution is likely to use https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.savgol_coeffs.html#scipy.signal.savgol_coeffs
and perform the filtering via the filtfilt()
function to get a zero-lag filter.
Marcus Nyström published the Matlab code for the algorithm on his homepage - it must have been recently, I remember searching for and not finding any available code online when I read the thesis: dev.humlab.lu.se/www-transfer/people/marcus-nystrom/EventDetector1.1.zip
the readme states that corrections have been introduced in June 2018. Will check out what they did later today and get back if I find something interesting.
"Because the ONH employs a Savitzky–Golay filter with a window length for our data of 19ms, and given the fact that this filter would delay the resulting smoothed position and velocity calculation by 9 ms and that this filter delay was never corrected in the original code, the algorithm could not be intended to classify the raw position signal. (Although Nyström & Holmqvist, 2010 , claim that the delay is removed, this is not correct." (found here: https://link.springer.com/article/10.3758%2Fs13428-018-1050-7)
here is a discussion and matlab solution of the issue: https://digital.library.txstate.edu/bitstream/handle/10877/6874/DiscussionOfTheFilterDelayIssueWithTheONH.pdf?sequence=8&isAllowed=y
I've read this very recent paper from Friedman et al: https://link.springer.com/article/10.3758%2Fs13428-018-1050-7 It reads like an extensive protocol of the combined WTFs of us when we looked at the algorithm and its results. I'll highlight the authors main points, they might be reaffirming suspicions of flaws or be helpful in other ways.
objective of the paper was to improve the Nyström & Holmqvist (2010) algorithm after it produced dissatisfying results. They assessed errors the algorithm made via human ratings of eye tracking data of 20 participants (26 seconds recording of reading, tracked with Eyelink 1000), wrote an improved algorithm (in matlab, can be found here: https://digital.library.txstate.edu/bitstream/handle/10877/6874/MNH_Code.zip?sequence=19&isAllowed=y), and compared both algorithms. The most frequent errors of the Nyström-Holmqvist Algorithm were
Some major changes Friedman et al. implemented were
Thx @AdinaWagner. I went through the description and here are the differences that I found:
Both algorithms cannot deal with pursuit events.
Turns out, the python function does adjust for the time shift!
This is stated in Nyström et al, 2010. I cannot see this being done in the code at all.