Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Off-by-one error in longest strike features #577

Closed
blu3r4y opened this issue Oct 21, 2019 · 0 comments
Closed

Off-by-one error in longest strike features #577

blu3r4y opened this issue Oct 21, 2019 · 0 comments

Comments

@blu3r4y
Copy link
Contributor

blu3r4y commented Oct 21, 2019

The two features longest_strike_below_mean and longest_strike_above_mean are implemented in a "less-than" and "greater-than" fashion, which yields incorrect results.

Here is a MWE where µ = 3 and the longest strike below and above is 2 - tsfresh yields 3.

assert fc.longest_strike_below_mean([1, 2, 3, 4, 5]) == 2
assert fc.longest_strike_above_mean([1, 2, 3, 4, 5]) == 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant