gpt4 book ai didi

python - Scikit-learn的fetch不下载数据集

转载 作者:太空宇宙 更新时间:2023-11-03 19:00:03 25 4
gpt4 key购买 nike

我从 iPython 执行了

from sklearn.datasets import fetch_olivetti_faces

该命令似乎立即执行,In [43] 出现在命令前面。

但是我在 get_home_data() 给出的位置没有找到任何内容,我也做不到

data = fetch_olivetti_faces()

错误:

---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-44-6a7f4fc09c38> in <module>()
1 # fetch the faces data
----> 2 data = fetch_olivetti_faces()

C:\Python33\lib\site-packages\sklearn\datasets\olivetti_faces.py in fetch_olivetti_faces(data_home, shuffle, random_state, download_if_missing)
87 % (DATA_URL, data_home)))
88 fhandle = urllib.request.urlopen(DATA_URL)
---> 89 buf = StringIO(fhandle.read())
90 mfile = loadmat(buf)
91 faces = mfile['faces'].T.copy()

TypeError: initial_value must be str or None, not bytes

downloading Olivetti faces from http://cs.nyu.edu/~roweis/data/olivettifaces.mat to C:\Users\me\scikit_learn_data

最佳答案

关于python - Scikit-learn的fetch不下载数据集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16256032/

25 4 0
文章推荐: html - 如何在 Bootstrap 的旋转木马顶部添加播放按钮?
文章推荐: css - 图像 slider 标题未正确对齐
文章推荐: css -
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com