I am currently trying to reproduce this tutorial on building a CNN based time series classifier for human activity recognition.
My setup is:
- Windows 10, Pycharm IDE with a new project for this tutorial, Python3.6, freshly installed the needed packages.
For reproducing, you need to download the activity data here and place it in the project directory under ./Data
The code executes the graphs well until this position:
df[LABEL] = le.fit_transform(df["activity"].values.ravel())
and throws following error:
Traceback (most recent call last):
File "C:/Users/bobin/PycharmProjects/Mussel/cnn_musseltest.py", line 226, in <module>
df[LABEL] = le.fit_transform(df["activity"].values.ravel())
File "C:\Users\bobin\PycharmProjects\Mussel\venv\lib\site-packages\sklearn\preprocessing\_label.py", line 117, in fit_transform
self.classes_, y = _unique(y, return_inverse=True)
File "C:\Users\bobin\PycharmProjects\Mussel\venv\lib\site-packages\sklearn\utils\_encode.py", line 31, in _unique
return _unique_python(values, return_inverse=return_inverse)
File "C:\Users\bobin\PycharmProjects\Mussel\venv\lib\site-packages\sklearn\utils\_encode.py", line 133, in _unique_python
uniques.extend(missing_values.to_list())
AttributeError: 'MissingValues' object has no attribute 'to_list'
df["activity"].values.ravel()
look like and what does thefit_transform
expect as input? $\endgroup$