Open momijiame opened 2 years ago
I was experiencing the same issue with Python 3.8. I downgraded to Python 3.7 and have been able to execute the same code successfully.
Thank you for the valuable information. Apparently, this problem depends on the version of pandas. If downgrading Python to 3.7, the version of pandas will be older (< 1.4). In other words, Python version 3.8 or later will also work if the pandas version is less than 1.4.
$ python -V
Python 3.9.13
$ pip list | grep pandas
pandas 1.4.3
$ pip list | grep numpy
numpy 1.21.5
$ pip install -U "pandas<1.4"
$ python -V
Python 3.9.13
$ pip list | grep pandas
pandas 1.3.5
$ pip list | grep numpy
numpy 1.21.5
You can add a small Exception clause for the IndexError
under the existing one in the _estimate_friedrich_coefficients
function to "solve" the problem.
try:
df["quantiles"] = pd.qcut(df.signal, r)
except ValueError:
return [np.NaN] * (m + 1)
except IndexError:
return [np.NaN] * (m + 1)
I am a newbie of tsfresh, so sorry if I misunderstood something.
The problem:
I encountered an exception in the following tutorial.
"Rolling/Time series forecasting" https://tsfresh.readthedocs.io/en/latest/text/forecasting.html
The reproduction procedure is as follows. Just input the snipets in the tutorial in order at the prompt.
The following exception are raised at (4.) operation.
Anything else we need to know?:
I investigated why the above issue arise. And I found out that the cause was the calculation of 'friedrich_coefficients' and 'max_langevin_fixed_point'. Since if both calculations are removed from FC settings, the exception will not be raised.
I also realized that these calculations do not support a single record DataFrame. For example, let's take the first (t=1) rolled DataFrame and give it. This raises the same exception as before.
However, the exception will not be raised for the next (t=2) rolled DataFrame.
This behavior does not occur in other calculations.
Environment: