[Hands On ML] 3. 분류
3. 분류¶3.1 MNIST¶ In [2]: from sklearn.datasets import fetch_openml mnist = fetch_openml('mnist_784', version=1, cache=True) # mnist In [4]: import numpy as np In [5]: X, y = mnist["data"], mnist["target"] X = np.array(X) y = y.astype(np.int8) print(X.shape, y.shape) (70000, 784) (70000,) In [9]: [i for i in range(20) if i = 17] Out[9]: [0, 1, 2, 3, 17, 18, 19] In [10]: mystr = 'life ..