Computes the Petrosian fractal dimension of a one-dimensional signal (Petrosian, 1995) – a fast waveform-complexity measure based on the number of sign changes in the signal's derivative (i.e. the density of local extrema). A smooth, oscillatory signal has few derivative sign changes and a Petrosian FD near 1; a complex or noise-like signal has many and a higher FD. \(P = \log_{10} N / (\log_{10} N + \log_{10}(N / (N + 0.4\,N_\delta)))\), where \(N\) is the signal length and \(N_\delta\) the number of sign changes in the first difference.
Value
A single numeric value, the Petrosian fractal dimension (typically in \([1, \sim1.1]\) for physiological signals).
References
Petrosian, A. (1995). "Kolmogorov complexity of finite sequences and recognition of different preictal EEG patterns." In Proceedings of the Eighth IEEE Symposium on Computer-Based Medical Systems, 212–217. doi:10.1109/CBMS.1995.465426
See also
svdEntropy for the singular-value complexity view,
eegComplexity for the multi-measure wrapper.