← Lab
kurtexp
confirmedupstream bugPython · tsfreshSystems & data structuresJuly 25, 2026
the question
Does tsfresh's fft_aggregated kurtosis compute the fourth standardized moment of the magnitude spectrum correctly?
what came out
tsfresh's fft_aggregated.get_kurtosis writes the final central-moment term as -3*centroid instead of -3*centroid**4, dropping the fourth power. For a spectrum with centroid 2.77 it returns 17.01 where the correct value is 1.80, wrong by exactly 3(c^4-c)/var^2. The sibling get_skew is correct.
method & receipts
- Result: confirmed
- Reproducible — one script re-runs the whole thing from scratch.
- Tested — a correctness/benchmark suite ships alongside the code.
→ read the code and re-run it
github.com/v-code01/kurtexp