0

As written in pg. 79 of Hands-On Machine Learning with Scikit-Learn and Tensorflow, I tried to import the MNIST data liked the book told me. The code didn't work, and I looked at other stackoverflow questions & github issue, but neither of those solutions worked, so I wanted to ask if anyone knows the solution. Thanks again for helping me solve this issue.

from sklearn.datasets import fetch_mldata
minst = fetch_mldata('MNIST Original')
Amodh
  • 367
  • 1
  • 3
  • 16

1 Answers1

1

The function fetch_mldata has been rerplaced in sklearn, you should use fetch_openml instead :

from sklearn.datasets import fetch_openml
mnist = fetch_openml('mnist_784')

However I am not sure weither the book is up to date with recent versions of sklearn, you should probably downgrade your sklearn version to the one used in the book or use a book that would be up to date with the current version.

endive1783
  • 827
  • 1
  • 8
  • 18