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:

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容