missingpy refers to outdated sklearn module structure
Closed this issue · 2 comments
julianhess commented
With a recent version of sklearn, importing signatureanalyzer returns the following error:
/mnt/j/local/miniconda3/envs/base38/lib/python3.8/site-packages/missingpy/knnimpute.py in <module>
11 from sklearn.utils.validation import check_is_fitted
12 from sklearn.utils.validation import FLOAT_DTYPES
---> 13 from sklearn.neighbors.base import _check_weights
14 from sklearn.neighbors.base import _get_weights
15
ModuleNotFoundError: No module named 'sklearn.neighbors.base'
This is because sklearn renamed sklearn.neighbors.base
to sklearn.neighbors._base
. A PR has been submitted to missingpy, but it appears that repo is dead (hasn't been updated since 2018): https://github.com/EvilTrtl/missingpy/tree/patch-1
Installing missingpy from that branch fixes the issue. We may want to amend setup.py to do the same, until the missingpy folks update their repo (if ever).
shankara-a commented
Honestly the imputation with sklearn works great for KNN. I should just remove missingpy
for the next release and fix setup.py
Thanks for the heads up!
shankara-a commented
Removed missingpy
from setup.py
and the function that calls it.