數字數據集?
此數據集由1797 張8x8圖像組成。每幅圖片,如下圖所示,都是手寫數字。為了利用這樣的8x8圖形,我們必須首先將其轉換為長度為64的特征向量。
有關此數據集的更多信息,請參見。

print(__doc__)
# Code source: Ga?l Varoquaux
# Modified for documentation by Jaques Grobler
# License: BSD 3 clause
from sklearn import datasets
import matplotlib.pyplot as plt
#Load the digits dataset
digits = datasets.load_digits()
#Display the first digit
plt.figure(1, figsize=(3, 3))
plt.imshow(digits.images[-1], cmap=plt.cm.gray_r, interpolation='nearest')
plt.show()
腳本的總運行時間:(0分0.123秒)