-1

I am trying to load a pickle file using below code.

# Load model from file classiferM1 = joblib.load("Model 1_ensemble.pkl")

Now I am facing error ModuleNotFoundError: No module named 'sklearn.ensemble.voting_classifier'

I understand that sklearn has this module as sklearn.ensemble.VotingClassifier.

Please let me know how I can overcome this error, can I edit the pickle file code?

Thanks and Regards, Surendra.

Surendra_Suri
  • 19
  • 1
  • 5

2 Answers2

0

You Have Typo mistake the original module name is VotingClassifier but you have written sklearn.ensemble.voting_classifier in your code. Change from sklearn.ensemble import voting_classifier into from sklearn.ensemble import VotingClassifier in your code..

Srikeshram
  • 87
  • 1
  • 5
0

Issue is resolved by installing Anaconda 2.7.

Surendra_Suri
  • 19
  • 1
  • 5