dask / dask-ml

Scalable Machine Learning with Dask
http://ml.dask.org
BSD 3-Clause "New" or "Revised" License
903 stars 256 forks source link

can't set attribute error when running PCA #955

Open zadbasheer opened 1 year ago

zadbasheer commented 1 year ago

Describe the issue: Below code returns can't set attribute error

Minimal Complete Verifiable Example:

from dask_ml.decomposition import PCA
import dask.array as da
import numpy as np
X = np.array([[-1, -1], [-2, -1], [-3, -2], [1, 1], [2, 1], [3, 2]])
dX = da.from_array(X, chunks=X.shape)
pca = PCA(n_components=2)
pca.fit(dX)
# Put your MCVE code here

Anything else we need to know?:

Environment:

I faced this issue when working with scikit_learn==1.1.2, It worked after i downgraded scikit_learn to scikit_learn==1.0.2