hyperopt / hyperopt-sklearn

Hyper-parameter optimization for sklearn
hyperopt.github.io/hyperopt-sklearn
Other
1.57k stars 270 forks source link

I would like to share my experience with downloading data using fetch_mldata - it's obsolete I #162

Open AnthonyTheKoala opened 3 years ago

AnthonyTheKoala commented 3 years ago

I thought I would like to share my experience of downloading data using your demonstration programs located at https://hyperopt.github.io/hyperopt-sklearn/.

I was particularly interested in loading the MNIST data for hand-writtten characters. The particular line of code to download the data is

..................
from sklearn.datasets import fetch_mldata
................
digits = fetch_mldata('MNIST original')

From the above you will get runtime errors.

Why? Because the underlying site that hosts the data has gone offline, source, https://github.com/ageron/handson-ml/issues/529 comment by "ageron commented on Dec 19, 2019" - copy from " to " and ctrl+f

The author of the comment said that fetch_mldata has been replaced by fetch_openml

In other words to download the well-known datasets, you will need to do this.

from sklearn.datasets import fetch_openml
................
sonar_data = fetch_openml('sonar')
iris_data = fetch_openml('iris')

BUT It does not work for the MNIST handwriting data:

digits = fetch_openml('MNIST original')

You'll get errors.

Questions please:

Info: OS: MS Win 7. Python: 3.8.5 sklearn: 0.22.2-post1 hpsklearn: no version method. But downloaded and installed 18th September 2020

Thank you, Anthony of Sydney