<commit_before>import numpy as np
import matplotlib.pyplot as plt

# factor for 90% coverage with 90% confidence using Normal distribution
# with 10 samples from table XII in [1]
# [1] <NAME>., & <NAME>. (2014). Applied statistics and
# probability for engineers. Sixth edition. <NAME> & Sons.
k = 2.535

amd_fx_run_times = np.load('amd_fx_8350_titanXP/6_break_times.npy')
n = np.load('amd_fx_8350_titanXP/n.npy')
amd_fx_run_times_means = amd_fx_run_times.mean(axis=2)
amd_fx_run_times_stds = amd_fx_run_times.std(axis=2, ddof=1)



plt.figure()
plt.grid()
plt.errorbar(n, amd_fx_run_times_means[0], yerr=k*amd_fx_run_times_stds[0], capsize=2.0, label='Numpy')
plt.errorbar(n, amd_fx_run_times_means[1], yerr=k*amd_fx_run_times_stds[1], capsize=2.0, label='TF GPU')
plt.xlabel('Number of data points')
plt.ylabel('Run time (seconds, Lower is better)')
plt.semilogx()

plt.figure()
plt.grid()

plt.errorbar(n[1:], amd_fx_run_times_means[0,1:] - amd_fx_run_times_means[0,1:], yerr=(k*amd_fx_run_times_stds[0,1:]), capsize=2.0, label='Numpy')
plt.errorbar(n[1:], amd_fx_run_times_means[1,1:] - amd_fx_run_times_means[0,1:], yerr=(k*amd_fx_run_times_stds[1,1:]), capsize=2.0, label='TF GPU')
plt.xlabel('Number of data points')
plt.ylabel('Run time difference (Lower is better)')
plt.semilogx()


plt.figure()
plt.grid()

plt.errorbar(n[1:], amd_fx_run_times_means[0,1:]/amd_fx_run_times_means[0,1:], yerr=(k*amd_fx_run_times_stds[0,1:])/amd_fx_run_times_means[0,1:], capsize=2.0, label='Numpy')
plt.errorbar(n[1:], amd_fx_run_times_means[1,1:]/amd_fx_run_times_means[0,1:], yerr=(k*amd_fx_run_times_stds[1,1:])/amd_fx_run_times_means[0,1:], capsize=2.0, label='TF GPU')
plt.xlabel('Number of data points')
plt.ylabel('Run time relative to Numpy (Lower is better)')
plt.semilogx()


plt.figure()
plt.grid()
plt.errorbar(n[1:], amd_fx_run_times_means[0,1:]/amd_fx_run_times_means[1,1:], yerr=(k*amd_fx_run_times_stds[0,1:])/amd_fx_run_times_means[1,1:], capsize=2.0, label='Numpy')
plt.errorbar(n[1:], amd_fx_run_times_means[1,1:]/amd_fx_run_times_means[1,1:], yerr=(k*amd_fx_run_times_stds[1,1:])/amd_fx_run_times_means[1,1:], capsize=2.0, label='TF GPU')
plt.xlabel('Number of data points')
plt.ylabel('Run time relative to TF GPU (Lower is better)')
plt.semilogx()

plt.show()<commit_msg>finish runtime plots<commit_after>import numpy as np
import matplotlib.pyplot as plt

# factor for 90% coverage with 90% confidence using Normal distribution
# with 10 samples from table XII in [1]
# [1] <NAME>., & <NAME>. (2014). Applied statistics and
# probability for engineers. Sixth edition. John Wiley & Sons.
k = 2.535

amd_fx_run_times = np.load('amd_fx_8350_titanXP/6_break_times.npy')
n = np.load('amd_fx_8350_titanXP/n.npy')
amd_fx_run_times_means = amd_fx_run_times.mean(axis=2)
amd_fx_run_times_stds = amd_fx_run_times.std(axis=2, ddof=1)



plt.figure()
plt.grid()
plt.errorbar(n, amd_fx_run_times_means[0], yerr=k*amd_fx_run_times_stds[0], capsize=2.0, label='Numpy')
plt.errorbar(n, amd_fx_run_times_means[1], yerr=k*amd_fx_run_times_stds[1], capsize=2.0, label='TF GPU')
plt.errorbar(n, amd_fx_run_times_means[2], yerr=k*amd_fx_run_times_stds[2], capsize=2.0, label='TF CPU')

plt.xlabel('Number of data points')
plt.ylabel('Run time (seconds, Lower is better)')
plt.semilogx()

plt.figure()
plt.grid()

plt.errorbar(n[1:], amd_fx_run_times_means[0, 1:] - amd_fx_run_times_means[0, 1:], yerr=(k*amd_fx_run_times_stds[0, 1:]), capsize=2.0, label='Numpy')
plt.errorbar(n[1:], amd_fx_run_times_means[1, 1:] - amd_fx_run_times_means[0, 1:], yerr=(k*amd_fx_run_times_stds[1, 1:]), capsize=2.0, label='TF GPU')
plt.errorbar(n[1:], amd_fx_run_times_means[2, 1:] - amd_fx_run_times_means[0, 1:], yerr=(k*amd_fx_run_times_stds[2, 1:]), capsize=2.0, label='TF CPU')

plt.xlabel('Number of data points')
plt.ylabel('Run time difference (Lower is better)')
plt.semilogx()


plt.figure()
plt.grid()

plt.errorbar(n[1:], amd_fx_run_times_means[0, 1:]/amd_fx_run_times_means[0, 1:], yerr=(k*amd_fx_run_times_stds[0, 1:])/amd_fx_run_times_means[0, 1:], capsize=2.0, label='Numpy')
plt.errorbar(n[1:], amd_fx_run_times_means[1, 1:]/amd_fx_run_times_means[0, 1:], yerr=(k*amd_fx_run_times_stds[1, 1:])/amd_fx_run_times_means[0, 1:], capsize=2.0, label='TF GPU')
plt.errorbar(n[1:], amd_fx_run_times_means[2, 1:]/amd_fx_run_times_means[0, 1:], yerr=(k*amd_fx_run_times_stds[2, 1:])/amd_fx_run_times_means[0, 1:], capsize=2.0, label='TF CPU')
plt.xlabel('Number of data points')
plt.ylabel('Run time relative to Numpy (Lower is better)')
plt.semilogx()


plt.figure()
plt.grid()
plt.errorbar(n[1:], amd_fx_run_times_means[0, 1:]/amd_fx_run_times_means[1, 1:], yerr=(k*amd_fx_run_times_stds[0, 1:])/amd_fx_run_times_means[1, 1:], capsize=2.0, label='Numpy')
plt.errorbar(n[1:], amd_fx_run_times_means[1, 1:]/amd_fx_run_times_means[1, 1:], yerr=(k*amd_fx_run_times_stds[1, 1:])/amd_fx_run_times_means[1, 1:], capsize=2.0, label='TF GPU')
plt.errorbar(n[1:], amd_fx_run_times_means[2, 1:]/amd_fx_run_times_means[1, 1:], yerr=(k*amd_fx_run_times_stds[2, 1:])/amd_fx_run_times_means[1, 1:], capsize=2.0, label='TF CPU')
plt.xlabel('Number of data points')
plt.ylabel('Run time relative to TF GPU (Lower is better)')
plt.semilogx()

plt.show()
{'fraction_non_alphanumeric': 0.17544531698908256, 'fraction_numerical': 0.044244397624976055, 'mean_word_length': 8.25886524822695, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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}}
{'dir': 'git-commits-cleaned', 'id': '5034373', 'n_tokens_mistral': 2548, 'n_tokens_neox': 2338, 'n_words': 370}