<jupyter_start><jupyter_text>After 20 parts in the box the thing gets quite random.<jupyter_code>df = pd.DataFrame([ys, y_hats]).T
df.columns = ['true', 'predicted']

df['error'] = (df['true'] - df['predicted']).abs()
df
plt.gcf().set_size_inches(16,10)
df.groupby('true')['error'].mean().plot(kind='bar')

plt.ylabel('error')
plt.xlabel('true')

# plt.yscale('log')
plt.ylim(1,100)

plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2240566037735849, 'fraction_numerical': 0.02358490566037736, 'mean_word_length': 7.173076923076923, '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': '132904', 'license': 'CNRI-Python', 'n_tokens_mistral': 187, 'n_tokens_neox': 176, 'n_words': 27, 'path': 'notebooks/03.03-bmp-statistical-fixing-of-digging-results.ipynb', 'repo_name': 'brunompacheco/part-counting', 'size': '424'}