facebookresearch / Kats

Kats, a kit to analyze time series data, a lightweight, easy-to-use, generalizable, and extendable framework to perform time series analysis, from understanding the key statistics and characteristics, detecting change points and anomalies, to forecasting future trends.
MIT License
4.88k stars 534 forks source link

Bug in TSFeatures: trend_num_increasing #247

Closed MichalDevir closed 2 years ago

MichalDevir commented 2 years ago

Hi,

I suspect there is a bug in TSFeature, in trend_num_increasing feature. It seems to count the number of decreasing trends instead of the number of increasing trends. This can be seen in the code, tsfeatures.py, lines 1631-1634:

for p in tdetected_time_points:
     if p.trend_direction == "decreasing":
          num_decreasing += 1
trend_detector_features["trend_num_increasing"] = num_decreasing`