Closed VargBurz closed 4 years ago
Closes #805
Seasonal segment was shifted to the left by one index
Wrong seasonality_offset calculation algorithm that discards fractional part of number.
seasonality_offset
floor division
math.ceil
AnomalyDetector
detect
process_data
get_seasonality_offset
to: segment['to']
train
AnomalyDetectorSegment
dict
detections_generator
Closes #805
Problem:
Seasonal segment was shifted to the left by one index
Root cause:
Wrong
seasonality_offset
calculation algorithm that discards fractional part of number.Changes:
floor division
withmath.ceil
inseasonality_offset
AnomalyDetector
methodsdetect
andprocess_data
to new methodget_seasonality_offset
get_seasonality_offset
unit testto: segment['to']
field to the cache aftertrain
AnomalyDetectorSegment
class instead ofdict
in anomaly detectordetections_generator
method which checks if values of data are out of boundsBefore:
After: