nishitpatel01 / Fake_News_Detection

Fake News Detection in Python
MIT License
544 stars 355 forks source link

No module named 'sklearn.linear_model.logistic' #22

Closed KishorJena closed 2 years ago

KishorJena commented 2 years ago
C:\Users\ADMIN\Desktop\Fake News\Fake_News_Detection\prediction.py:19: DeprecationWarning: Please use `csr_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.csr` namespace is deprecated.
  load_model = pickle.load(open('final_model.sav', 'rb'))
C:\Users\ADMIN\Desktop\Fake News\fake\lib\site-packages\sklearn\base.py:329: UserWarning: Trying to unpickle estimator TfidfTransformer from version 0.18.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
  warnings.warn(
C:\Users\ADMIN\Desktop\Fake News\fake\lib\site-packages\sklearn\base.py:329: UserWarning: Trying to unpickle estimator TfidfVectorizer from version 0.18.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
  warnings.warn(
Traceback (most recent call last):
  File "C:\Users\ADMIN\Desktop\Fake News\Fake_News_Detection\prediction.py", line 28, in <module>
    detecting_fake_news(var)
  File "C:\Users\ADMIN\Desktop\Fake News\Fake_News_Detection\prediction.py", line 19, in detecting_fake_news
    load_model = pickle.load(open('final_model.sav', 'rb'))
ModuleNotFoundError: No module named 'sklearn.linear_model.logistic'
risuxx commented 2 years ago

I also get the same error. If the version of scikit-learn is higher than 0.24.0, this err would occur. In my test, if using scikit-learn=0.24.0, there would be no err. Then I turned to scikit-learn=0.24.1, the err happened.

KishorJena commented 2 years ago

yeah version issue