You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran a pipeline with signal T-10 from the publicly available NASA Telemanom signal. My train/test split was 571 training samples and 24 testing samples. The code seems to be breaking because the span in ewm is int(len(y)*smoothing_window) = int(24*0.01) = int(0.24) = 0 which is less than 1. As per the pandas documentation span >= 1 (https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.ewm.html)
One way to fix this is to add a max(1, int(len(y)*smoothing_window)) so that we never go below 1 for the span.
Traceback:
Traceback (most recent call last):
File "run_pipelines.py", line 76, in <module>
anoms = pipeline.predict(test)
File "/home/itinawi/meng/venv/lib/python3.5/site-packages/mlblocks/mlpipeline.py", line 264, in predict
outputs = block.produce(**produce_args)
File "/home/itinawi/meng/venv/lib/python3.5/site-packages/mlblocks/mlblock.py", line 268, in produce
return self.primitive(**produce_args)
File "/home/itinawi/meng/IML-private/Orion/analysis/timeseries_anomalies.py", line 33, in regression_errors
return pd.Series(errors).ewm(span=smoothing_window).mean().values
File "/home/itinawi/meng/venv/lib/python3.5/site-packages/pandas/core/generic.py", line 8927, in ewm
adjust=adjust, ignore_na=ignore_na, axis=axis)
File "/home/itinawi/meng/venv/lib/python3.5/site-packages/pandas/core/window.py", line 2489, in ewm
return EWM(obj, **kwds)
File "/home/itinawi/meng/venv/lib/python3.5/site-packages/pandas/core/window.py", line 2074, in __init__
self.com = _get_center_of_mass(com, span, halflife, alpha)
File "/home/itinawi/meng/venv/lib/python3.5/site-packages/pandas/core/window.py", line 2389, in _get_center_of_mass
raise ValueError("span must satisfy: span >= 1")
ValueError: span must satisfy: span >= 1
The text was updated successfully, but these errors were encountered:
What I Did
I ran a pipeline with signal T-10 from the publicly available NASA Telemanom signal. My train/test split was 571 training samples and 24 testing samples. The code seems to be breaking because the
span
inewm
isint(len(y)*smoothing_window) = int(24*0.01) = int(0.24) = 0
which is less than 1. As per the pandas documentationspan >= 1
(https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.ewm.html)One way to fix this is to add a
max(1, int(len(y)*smoothing_window))
so that we never go below 1 for the span.The text was updated successfully, but these errors were encountered: