Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error importing eli5.lime due to deprecated 'itemfreq' from 'scipy.stats' #423

Open
AndreaMagnanini opened this issue Nov 13, 2022 · 0 comments

Comments

@AndreaMagnanini
Copy link

while trying to import package eli5.lime, interpret gives the following error:

ImportError                               Traceback (most recent call last)
Cell In [10], line 1
----> 1 import eli5.lime

File c:\Users\magna\AppData\Local\Programs\Python\Python310\lib\site-packages\eli5\lime\__init__.py:2
      1 # -*- coding: utf-8 -*-
----> 2 from .lime import (
      3     TextExplainer,
      4     _train_local_classifier
      5 )

File c:\Users\magna\AppData\Local\Programs\Python\Python310\lib\site-packages\eli5\lime\lime.py:18
     16 import eli5
     17 from eli5.sklearn.utils import sklearn_version
---> 18 from eli5.lime.samplers import BaseSampler
     19 from eli5.lime.textutils import DEFAULT_TOKEN_PATTERN, CHAR_TOKEN_PATTERN
     20 from eli5.lime.samplers import MaskingTextSamplers

File c:\Users\magna\AppData\Local\Programs\Python\Python310\lib\site-packages\eli5\lime\samplers.py:9
      6 import six
      8 import numpy as np
----> 9 from scipy.stats import itemfreq
     10 from sklearn.base import BaseEstimator, clone
     11 from sklearn.neighbors import KernelDensity

ImportError: cannot import name 'itemfreq' from 'scipy.stats' (c:\Users\magna\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy\stats\__init__.py)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant