<jupyter_start><jupyter_text>Data Visualization Preamble<jupyter_code>import h5py
import matplotlib.pyplot as plt
import numpy as np
from pathlib import Path<jupyter_output><empty_output><jupyter_text>Load Data<jupyter_code>root_dir = Path().resolve().parents[1]
print(root_dir)
with h5py.File(root_dir / 'data' / 'processed' / 'X.hdf5') as X_file:
    sinusoids = X_file['sinusoids'][:]

with h5py.File(root_dir / 'data' / 'processed' / 'y.hdf5') as y_file:
    frequencies = y_file['frequencies'][:].ravel()
    phases = y_file['phases'][:].ravel()
    amplitudes = y_file['amplitudes'][:].ravel()<jupyter_output><empty_output><jupyter_text>Visualize N=4 Samples<jupyter_code>N = 4

t = np.arange(100)/16000

plt.figure(figsize=(16,16))

for i in range(1,N+1):
    plt.subplot(4,1,i)
    plt.plot(t,sinusoids[i])
    plt.xlabel('time', fontsize=20)
    plt.ylabel('amplitude', fontsize=20)
    plt.title('f: {:.2f} Hz, $\phi$: {:.2f} rad, A: {:.2f}'.format(frequencies[i], phases[i], amplitudes[i]), fontsize=24)
    
plt.tight_layout()
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18072289156626506, 'fraction_numerical': 0.030583873957367932, 'mean_word_length': 5.7924528301886795, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '421244', 'license': 'MIT', 'n_tokens_mistral': 470, 'n_tokens_neox': 445, 'n_words': 70, 'path': 'notebooks/explore/01-DataVisualization.ipynb', 'repo_name': 'egaznep/toy_vae_example', 'size': '1079'}