<jupyter_start><jupyter_text>Load the Dataset<jupyter_code>from sklearn.datasets import fetch_openml

mnist = fetch_openml('mnist_784', version=1)
mnist.keys()
x_data, y_data = mnist['data'], mnist['target']
print('shape of x_data:',x_data.shape)
print('shape of y_data:',y_data.shape)
import matplotlib.pyplot as plt
plt.imshow(x_data[0].reshape(28,28), cmap='binary')
plt.axis('off')
plt.show()
# mnist data is already split into test and train; first 60k examples are train and rest test
x_train, x_test, y_train, y_test = x_data[:60000], x_data[60000:], y_data[:60000], y_data[60000:]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14401294498381878, 'fraction_numerical': 0.05016181229773463, 'mean_word_length': 8.238805970149254, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '443291', 'license': 'MIT', 'n_tokens_mistral': 265, 'n_tokens_neox': 245, 'n_words': 53, 'path': '03-Hands-On_ML_Oreilly/02.Classification.ipynb', 'repo_name': 'L-ashwin/Exploring-ml', 'size': '618'}