<jupyter_start><jupyter_text>Distribution of $x$-values<jupyter_code>grid = sns.FacetGrid(
    diff.reset_index(),
    row="n1d",
    col="L",
    hue="nstep",
    sharex="col",
    sharey=False,
    margin_titles=True,
)

grid.map(sns.distplot, "x", norm_hist=True)
grid.add_legend()
grid.set_xlabels("$\Delta x$")

sns.despine(grid.fig, left=True, trim=True)
for ax in grid.axes.flatten():
    ax.set_yticks([])

plt.show(grid.fig)<jupyter_output><empty_output><jupyter_text>grid.savefig("x-numerical-error-ensemblewise.jpeg", bbox_inches="tight")<jupyter_code>grid = sns.FacetGrid(diff.reset_index(), col="L", row="n1d", sharex="col", sharey=False)

grid.map(sns.distplot, "x", norm_hist=True)

grid.add_legend()
grid.set_xlabels("$\Delta x$")

sns.despine(grid.fig, left=True, trim=True)
for ax in grid.axes.flatten():
    ax.set_yticks([])

plt.show(grid.fig)
grid = sns.FacetGrid(diff.reset_index(), col="L", sharex=False, sharey=False)

grid.map(sns.distplot, "x", norm_hist=True)
grid.add_legend()
grid.set_xlabels("$\Delta x$")

sns.despine(grid.fig, left=True, trim=True)
for ax in grid.axes.flatten():
    ax.set_yticks([])

plt.show(grid.fig)
vals = diff.x.dropna().sort_values()

vals = vals[(np.abs(stats.zscore(vals)) < 2)]


mu, std = norm.fit(vals)
x = np.linspace(diff.x.min(), diff.x.max(), 1000)
p = norm.pdf(x, mu, std)
grid = sns.FacetGrid(diff.reset_index(), sharex=False, sharey=False, xlim=(-1.e-12, 1.e-12))

grid.map(sns.distplot, "x", norm_hist=True)

grid.map(sns.distplot, "x", norm_hist=True)
grid.add_legend()
grid.set_xlabels("$\Delta x$")

sns.despine(grid.fig, left=True, trim=True)
for ax in grid.axes.flatten():
    ax.set_yticks([])

ax.plot(x, p, label=f"$N(\mu={mu:1.2e}, \sigma={std:1.2e})$", color="green")
ax.legend(frameon=False, fontsize=6, loc="upper left", bbox_to_anchor=(0.6, 0.5))

grid.fig.set_dpi(250)

plt.show(grid.fig)<jupyter_output><empty_output><jupyter_text>grid.fig.savefig("x-numerical-error.jpeg", bbox_inches="tight")<jupyter_code># Contact interaction<jupyter_output><empty_output><jupyter_text>cdiff = diff.reset_index().groupby(["L", "n1d", "nstep"])[["contact_strength"]].mean()vals = cdiff.contact_strength.dropna().sort_values()vals = vals[(np.abs(stats.zscore(vals)) < 4)]mu, std = norm.fit(vals)x = np.linspace(vals.min(), vals.max(), 1000)p = norm.pdf(x, mu, std) grid = sns.FacetGrid(cdiff.reset_index(), sharex=False, sharey=False, xlim=(-5.e-15, 5.e-15))grid.map(sns.distplot, "contact_strength", norm_hist=True)grid.map(sns.distplot, "contact_strength", norm_hist=True)grid.add_legend()grid.set_xlabels("$\Delta c$")sns.despine(grid.fig, left=True, trim=True)for ax in grid.axes.flatten():    ax.set_yticks([])ax.plot(x, p, label=f"$N(\mu={mu:1.2e}, \sigma={std:1.2e})$", color="green")ax.legend(frameon=False, fontsize=6, loc="upper left", bbox_to_anchor=(0.6, 0.5))grid.fig.set_dpi(250)plt.show(grid.fig)<jupyter_code>grid.fig.savefig("c-numerical-error.jpeg", bbox_inches="tight")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20910003345600536, 'fraction_numerical': 0.01639344262295082, 'mean_word_length': 6.608142493638677, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 17, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '44961', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1328, 'n_tokens_neox': 1270, 'n_words': 163, 'path': 'notebooks/devel/numerical-errors.ipynb', 'repo_name': 'ckoerber/luescher-nd', 'size': '2989'}