Closed albienaculan14 closed 5 months ago
I have the same question
The same TypeError also happens in Lab.fit_transform_resample(X, X) in time_series_forecasting.ipynb.
What is your numpy version? There is no update for a while, probably new versions of libraries break backward compatibility. It works here with
Python implementation: CPython
Python version : 3.10.9
IPython version : 8.13.1
sklearn: 1.2.2
plotly: 5.13.1
openml: 0.13.0
numpy : 1.23.5
Almost all examples are broken with scikit-learn 1.3.x. I hope there is an update as this is a very interesting software,
It is easily to be solved using the lambda x: np.max(x), be like:
Scaler(metric='persistence_image', function=lambda x: np.max(x), n_jobs=-1).fit_transform(persistence_diagrams)
I re-ran the Lorenz attractor notebook from giotto-tda examples. In the part using scaler,
diagramScaler = Scaler()
X_scaled = diagramScaler.fit_transform(X_diagrams)
diagramScaler.plot(X_scaled, sample=window_number)
I get the following error:
TypeError: Parameter
function
is of type <class 'numpy._ArrayFunctionDispatcher'> while it should be of type (<class 'function'>, <class 'NoneType'>).I also ran this using the data that I have and the Scaler method also produced the same error.