sklearn无法加载fetch_mldata导致不能加载MNIST数据集解决方案

相信大部分有这个问题的童鞋都是在看《机器学习实战:基于Scikit-Learn和TensorFlow》这本书哈,其实fetch_mldata在新版的sklearn里已经被弃用了,新版的是openml。
原著上很多代码其实已经过时了,大家在学习的时候应该去github上把作者实时更新的源码拿过来阅读呀!
作者原话:
Warning: fetch_mldata() is deprecated since Scikit-Learn 0.20. You should use fetch_openml() instead. However, it returns the unsorted MNIST dataset, whereas fetch_mldata() returned the dataset sorted by target (the training set and the test test were sorted separately). In general, this is fine, but if you want to get the exact same results as before, you need to sort the dataset using the following function:

你可能感兴趣的:(sklearn无法加载fetch_mldata导致不能加载MNIST数据集解决方案)