Skip to content Skip to sidebar Skip to footer

Why I Get Memoryerror When I Run Adf Test?

This is my Timeseries: data z_data zp_data time 2018-01-01 00:00:00 -0.045988 NaN NaN 20

Solution 1:

autolag is wasting memory because it keeps all full models in memory during the lag search.

see https://github.com/statsmodels/statsmodels/issues/1849

Some possible workarounds are to either

  • fix the number of lags and avoid the automatic lag search, or
  • limit the number of lags, set maxlag, that are evaluated for the lag search

This wasn't really designed with large time series in mind.

Solution 2:

As per Python's documentation:

exception MemoryError

Raised when an operation runs out of memory but the situation may still be rescued (by deleting some objects). The associated value is a string indicating what kind of (internal) operation ran out of memory. Note that because of the underlying memory management architecture (C’s malloc() function), the interpreter may not always be able to completely recover from this situation; it nevertheless raises an exception so that a stack traceback can be printed, in case a run-away program was the cause.

Post a Comment for "Why I Get Memoryerror When I Run Adf Test?"