0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

from sklearn.datasets import fetch_mldata -> fetch_openml

Posted at

背景

t-SNEでクラスタリングしようと思い、いろいろサンプルコードを漁っていた際に発生した事象
こちらを参考にコーディングしていた

発生箇所

その1

import matplotlib.pyplot as plt
from mpl.toolkits.mplot3d import Axes3D
import seaborn as sns
from __future__ import print_function
from sklearn.datasets import fetch_openml # <- ここ
from sklearn.decompositon import PCA
from sklearn.manifold import TSNE

%matplotlib inline

その2

mnist = fetch_mldata("MNIST original") # <- ここ
X = mnist.data / 255.0
y = mnist.target
print(X.shape, y.shape)

修正コード

その1

import matplotlib.pyplot as plt
from mpl.toolkits.mplot3d import Axes3D
import seaborn as sns
from __future__ import print_function
from sklearn.datasets import fetch_openml # <- ここ
from sklearn.decompositon import PCA
from sklearn.manifold import TSNE

%matplotlib inline

その2

mnist = fetch_openml('mnist_784', version=1,) # <- ここ
X = mnist.data / 255.0
y = mnist.target

print(X.shape, y.shape)

発生原因

fetch_mldataの参照先である https://openml.org が落ちているのが原因らしい

参照

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?