<jupyter_start><jupyter_text>The confidence intervals in the book are very wide and they suggest how to reduce the model. I am not sure why the confidence intervals from kipet are very tight. The data is a bit different since it is generated with random noise. Still it is hard to envision such a large difference. It needs to be looked into further.<jupyter_code>fig, ax = plt.subplots(3)
cmplist = ['A', 'B', 'C']
for (i, c) in enumerate(cmplist):
    ax[i].scatter(r1.results.Cm.index, r1.results.Cm[c])
    ax[i].plot(r1.results.Z.index, r1.results.Z[c])
    ax[i].set_xlabel('time')
    ax[i].set_ylabel(c)<jupyter_output><empty_output><jupyter_text>In the book, they look at the covariance matrix of parameters (which are log10(k)). To look at a covariance matrix for ln(k) we need to do the following transformation of the estimated covariance matrix$$ Cov(ln(k)) = Diag(k)^{-1}Cov(k)Diag(k)^{-1} $$<jupyter_code># scaled covariance
k_diag_inv = np.diag(1 / np.array(list(r1.results.P.values())))
cov_est_scaled = np.dot(np.dot(k_diag_inv, cov_est), k_diag_inv)
cov_est_scaled
eigval, eigvec = sla.eig(cov_est_scaled)
eigval, max(eigval) / min(eigval)
eigvec[:, 4], eigvec[:, 5]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1308641975308642, 'fraction_numerical': 0.010699588477366255, 'mean_word_length': 5.4, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '375359', 'license': 'MIT', 'n_tokens_mistral': 458, 'n_tokens_neox': 442, 'n_words': 133, 'path': 'kipet_paresto/jbr_hbv_parmest.ipynb', 'repo_name': 'notesofdabbler/learn_kipet', 'size': '1215'}