每当我试图从mnist获取数据时,我都会收到一个connectionreseterror,不知道为什么发生了。这个是一个从sklearn做PCA和t-sne数据降维教程。我认为这可能是python版本的问题,但在2.6、3.5或3.7中不起作用
from sklearn.datasets import fetch_mldata
mnist = fetch_mldata("MNIST original")
X = mnist.data / 255.0
y = mnist.target
ConnectionResetError Traceback (most recent call last)
<ipython-input-11-781ac9f03cc8> in <module>()
----> 1 mnist = fetch_mldata("MNIST original")
2 X = mnist.data / 255.0
3 y = mnist.target
/anaconda3/envs/py35/lib/python3.5/site-packages/sklearn/datasets/mldata.py in fetch_mldata(dataname, target_name, data_name, transpose_data, data_home)
152 urlname = MLDATA_BASE_URL % quote(dataname)
153 try:
--> 154 mldata_url = urlopen(urlname)
155 except HTTPError as e:
156 if e.code == 404:
ConnectionResetError: [Errno 54] Connection reset by peer
fetch_mldata
是deprecated,因为scikit学习v0.20,并替换为^{有关example,请参阅文档。你知道吗
相关问题 更多 >
编程相关推荐