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
_check_weights() was removed from sklearn after version 1.2.X. Therefore, missingpy is no longer compatible with the latest version of SciKit-learn.
As a quick fix I copied the original code from the sklearn/neighbors/_base.py file (version 0.22.X) to my local copy of missingpy/knnimpute.py:
def_check_weights(weights):
"""Check to make sure weights are valid"""ifweightsin (None, 'uniform', 'distance'):
returnweightselifcallable(weights):
returnweightselse:
raiseValueError("weights not recognized: should be 'uniform', ""'distance', or a callable function")
... and removed the import:
# from sklearn.neighbors.base import _check_weight
The text was updated successfully, but these errors were encountered:
_check_weights() was removed from sklearn after version 1.2.X. Therefore, missingpy is no longer compatible with the latest version of SciKit-learn.
As a quick fix I copied the original code from the
sklearn/neighbors/_base.py
file (version 0.22.X) to my local copy ofmissingpy/knnimpute.py
:... and removed the import:
The text was updated successfully, but these errors were encountered: