The latest version of the C++ using the Eigen FFT library is here:

It has all the necessary padding to make the Eigen implementation efficient.

]]>Yes, it’s very well known by the signal processing folks and the computational statisticians. It’s just that when I asked Matt, he said “it’s a consequence of the Wiener-Khinchin theorem,” which wasn’t quite enough for me to get to an algorithm.

]]>http://eceweb1.rutgers.edu/~orfanidi/osp2e/ ]]>

I actually did a simple version of what you just suggested years ago — we had a couple of years worth of newswire text with a date assigned to the day. We looked for words which were strongly auto-correlated with a 7-day lag; sports and financial terms pop out, if I recall correctly. Celebrations, holidays and financial things like taxes jump out if you look for a 365-day lag. We just looked at a few fixed lags (and we also tried correlating with the day of the month, which doesn’t correspond to a fixed lag as different months have different numbers of days).

But of course with an FFT we could have looked across all lags simultaneously — and we probably would have been able to publish on the basis of the cool maths it would have contained!

]]>Yes, Fourier analysis is used to discover time periodicities. That’s sort of what it’s all about! If you think about linguistic issues like tracking formants in the frequency domain, it’s all about discovering maximal time periodicities.

Mitzi’s fascinated by George Church’s lab’s analysis of circadian rhythms of fruit flies — that involved Fourier analysis.

For natural language data, I’d think you could tease apart daily, weekly, monthly and annual cycles using raw data containing frequency of relevant terms like “weekend” and “Saturday” and “New Year’s” (though it does bring up that different cultures have different start of year dates and 24 time zones could be problematic. In fact, it’d make a neat project to do this the other way around. Calculate the autocorrelations of a bunch of terms and figure out which ones are periodic.

]]>