eriklindernoren / ML-From-Scratch

Machine Learning From Scratch. Bare bones NumPy implementations of machine learning models and algorithms with a focus on accessibility. Aims to cover everything from linear regression to deep learning.
MIT License
23.99k stars 4.59k forks source link

mnist = fetch_mldata('MNIST original') #66

Open dbl001 opened 4 years ago

dbl001 commented 4 years ago
URLError: <urlopen error [Errno 110] Connection timed out>

mldata.org appears to be down.

Please see: https://github.com/scikit-learn/scikit-learn/issues/8588

AasthaVarma commented 4 years ago

fetch_mldata() was used to download MNIST dataset from mldata.org which was pretty unstable so was shutdown eventually. Scikit-Learn 0.20 uses fetch_openml() instead. You can just do this -

import sklearn
print(sklearn.__version__)

try:
    from sklearn.datasets import fetch_openml
    mnist = fetch_openml('mnist_784', version=1, cache=True)
except ImportError:
    from sklearn.datasets import fetch_mldata
    mnist = fetch_mldata('MNIST original')

Hope this helps😃