You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Some scikit-learn estimators no longer work with array_function enabled #541
The length of that array is unknown, leading to the nan shape, which breaks _check_multi_class.
The simplest fix, from dask-ml's point of view, is for scikit-learn to convert that array-like to a concrete ndarray. But is that appropriate for all arrays? Is it appropriate for all estimators? Some estimators, like RandomForestClassfiers accept 2d output, which may be sparse. But the unique set should presumably be small.
Activity
TomAugspurger commentedon Aug 19, 2019
For the record, the error is from the fact that
np.unique(da.Array)no longer converts to an ndarrayWith array function disabled
With array function enabled
The length of that array is unknown, leading to the
nanshape, which breaks_check_multi_class.The simplest fix, from dask-ml's point of view, is for scikit-learn to convert that array-like to a concrete ndarray. But is that appropriate for all arrays? Is it appropriate for all estimators? Some estimators, like
RandomForestClassfiersaccept 2d output, which may be sparse. But the unique set should presumably be small.thomasjpfan commentedon Feb 21, 2020
The code snippet in original issue now works on sklearn 0.22 because of scikit-learn/scikit-learn#14702