<jupyter_start><jupyter_text>Long runs<jupyter_code>df_lstsq = load_tensorboard('runs/long_lstsq/')
df_scaled = load_tensorboard('runs/long_scaled/')
df_lstsq.keys()
plt.semilogy(df_lstsq.index, df_lstsq['MSE_0'], label='Lst. Sq.')
plt.semilogy(df_scaled.index, df_scaled['MSE_0'], label='Logprob scaled')

plt.legend()
plt.title('MSE')
plt.ylim([3e-4, 1e-3])
plt.semilogy(df_lstsq.index, df_lstsq['Regression_0'], label='Lst. Sq.')
plt.semilogy(df_scaled.index, df_scaled['Regression_0'], label='Log prob scaled')

plt.legend()
plt.plot(df_lstsq.tail(1)[scaled_coeff_keys].T.to_numpy(), 'o', label='Lst. Sq.')
plt.plot(df_scaled.tail(1)[scaled_coeff_keys].T.to_numpy(), 'x', label='Log prob scaled')

plt.legend()
plt.title('Scaled coefficients at final epoch')
coeffs_lstsq = df_lstsq.tail(1)[coeff_keys].to_numpy().squeeze()
coeffs_scaled = df_scaled.tail(1)[coeff_keys].to_numpy().squeeze()
plt.plot(np.abs(true_coeffs - coeffs_lstsq), 'o', label='Lst. Sq.')
plt.plot(np.abs(true_coeffs - coeffs_scaled), 'o', label='Logprob scaled')

plt.legend()
plt.title('Absolute error in coefficients')
for key in scaled_coeff_keys:
    plt.plot(df_lstsq[key], '-', label=f'{key[-1]}')
    plt.plot(df_scaled[key], '--' ,label=f'{key[-1]}')
#plt.legend()
plt.ylim([-1.5, 1])
plt.title('Scaled coefficients')<jupyter_output><empty_output><jupyter_text>Check on double optimal scaled<jupyter_code>df = load_tensorboard('runs/deepmod_lstsq_logprob_doublescaled/')
plt.semilogy(df['MSE_0'])<jupyter_output><empty_output><jupyter_text>Well thats shits. Tell us enough  Checking extra TB<jupyter_code>df = load_tensorboard('runs/deepmod_logprob_extra_tb/')
df.keys()
library_terms = [key for key in df.keys() if key[:11] == 'mae_library']
for key in library_terms:
    plt.semilogy(df[key], label=f'{key[-1]}')
plt.legend()
for key in library_terms[1:4]:
    plt.semilogy(df[key], label=f'{key[-1]}')
plt.semilogy(df['mae_time_deriv'], label='time_deriv')
plt.legend()
mae = []
for key in library_terms[1:4]:
    mae.append(df[key].to_numpy()[:, None])
mae[0].shape<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18876080691642652, 'fraction_numerical': 0.012968299711815562, 'mean_word_length': 7.536885245901639, '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': '389302', 'license': 'MIT', 'n_tokens_mistral': 925, 'n_tokens_neox': 885, 'n_words': 124, 'path': 'experiments/old_vs_new/.ipynb_checkpoints/analysis-checkpoint.ipynb', 'repo_name': 'GJBoth/DeePyMoD_torch', 'size': '2082'}