0

In the past I've used auto-correlation to detect periodic structures in numeric data. This algorithm works even if the data isn't repeated (exact copies) but just follows a general periodic structure. It can also work okay if the data is binary, e.g. I've used it to detect rhythm patterns and metric structure in music. But what algorithm can I use to do the same with non-numeric data e.g. a sequence of symbols? It seems like if you replaced the multiplication of values with a lookup through a similarity matrix you could essentially use auto-correlation on non-numeric data, but I don't think you'd be able to do it fast with FFT. Is there a better algorithm?

Justin Olbrantz
  • 647
  • 3
  • 11
  • `abcdedcba` and `klmnonmlk` reveal similar behaviour of numerical (ascii) codes, but are they repeats of each other? – MBo May 19 '23 at 09:22
  • You can use Hartley transform: https://en.wikipedia.org/wiki/Hartley_transform ; it also converts sample sequence to spectrum, and backward. – olegarch May 19 '23 at 17:53
  • @olegarch I'm... unclear how that would be a help. With numeric values I can use FFT + Wiener–Khinchin to quickly calculate autocorrelation. How does Hartley transform allow me to calculate autocorrelation with non-numeric values? – Justin Olbrantz May 20 '23 at 07:13
  • With Hartley transform, you can convert time series to spectrum. As same as with FFT. When you will see spectrum, you can see frequencies of all correlations. You can extract max element from the result, and it will shows most important frequency component. – olegarch May 21 '23 at 03:11
  • @olegarch Okay... but the input to the Hartley transform is numeric, is it not? – Justin Olbrantz May 21 '23 at 07:30
  • Oh, you right! Hartley for numeric.. I see, my suggestion is wrong, sorry. – olegarch May 21 '23 at 23:24

0 Answers0