<jupyter_start><jupyter_text>Reproducing Images<jupyter_code>pca=PCA(n_components=k,whiten=True)
transformed_data=pca.fit_transform(x)
transformed_data.shape
x_approx=pca.inverse_transform(transformed_data)
x_approx.shape
x_approx_image=x_approx.reshape((400,64,64))
fig=plt.figure(figsize=(8,8))
for i in range(64):
    ax=fig.add_subplot(8,8,i+1)
    ax.imshow(x_approx_image[i],cmap=plt.cm.bone)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14578587699316628, 'fraction_numerical': 0.03189066059225513, 'mean_word_length': 11.941176470588236, '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': '388623', 'license': 'MIT', 'n_tokens_mistral': 201, 'n_tokens_neox': 188, 'n_words': 15, 'path': 'Lecture 20 PCA-2/Reproducing Images/Reproducing Images.-checkpoint.ipynb', 'repo_name': 'Paraskk/Data-Science-and-Machine-Leaning-', 'size': '439'}