antoinecarme / pyaf

PyAF is an Open Source Python library for Automatic Time Series Forecasting built on top of popular pydata modules.
BSD 3-Clause "New" or "Revised" License
457 stars 73 forks source link

Overflow in cumprod (relative difference transformation) #179

Closed antoinecarme closed 2 years ago

antoinecarme commented 2 years ago

This is a bug. When building a PyAF model with this dataset, a lot of warnings are issued.

Dataset :


df = pd.DataFrame()
N = 1000
lTimeVar = 'Time'
lSignalVar = 'Signal'
df[lTimeVar] = pd.date_range("2018-01-01", periods=N, freq="H")
df[lSignalVar] = np.random.random(df.shape[0]) 

Output :

INFO:pyaf.std:START_TRAINING 'Signal'
/home/antoine/.local/lib/python3.9/site-packages/numpy/core/fromnumeric.py:57: RuntimeWarning: overflow encountered in accumulate
  return bound(*args, **kwds)
/home/antoine/.local/lib/python3.9/site-packages/numpy/core/fromnumeric.py:57: RuntimeWarning: overflow encountered in accumulate
  return bound(*args, **kwds)
/home/antoine/.local/lib/python3.9/site-packages/numpy/core/fromnumeric.py:57: RuntimeWarning: overflow encountered in accumulate
  return bound(*args, **kwds)
/home/antoine/.local/lib/python3.9/site-packages/numpy/core/fromnumeric.py:57: RuntimeWarning: overflow encountered in accumulate
  return bound(*args, **kwds)
/home/antoine/.local/lib/python3.9/site-packages/numpy/core/fromnumeric.py:57: RuntimeWarning: overflow encountered in accumulate
  return bound(*args, **kwds)
antoinecarme commented 2 years ago

Fixed.

antoinecarme commented 2 years ago

Fixed.