<jupyter_start><jupyter_text>Commands usedThese are the commands used to run the active leanring processes for entropy based and random sampling.Entropy based```python gp-net.py -data formation_energy_per_atom_data.pkl -ndims 1 -q 3000 -frac 0.4 -epochs 0 -prev -cycle 1 3000 -maxiters 100 -stop 0.99 -include```Random```python gp-net-skip-activation.py -data formation_energy_per_atom_data.pkl -ndims 1 -q 3000 -frac 0.4 -epochs 0 -prev -cycle 1 3000 -maxiters 0 -stop 0.99 -include -samp random -amp 0.4281 -length 2.3997```<jupyter_code>entropy_result = np.load('data-sets/gp_mae_entropy.npy')
random_result = np.load('data-sets/gp_mae_random.npy')
fig, ax = plt.subplots(1, 1, figsize=(8, 6))
ax.plot(np.arange(1800, len(entropy_result)+1800), entropy_result, label='Entropy', lw=3)
ax.plot(np.arange(1800, len(random_result)+1800), random_result, label='Random', lw=3)
ax.hlines(random_result[-1], 0, 4800, ls='--', lw=1)
ax.set_xlabel('Training set size', size=14)
ax.set_ylabel('Mean absolute error (meV/atom)', size=14)
ax.set_xlim(1800, 4800)
ax.legend(fontsize=14)
plt.savefig('active-learning.png')
print('Entropy learning after 3000 cycles: {:.4f}'.format(entropy_result[-1]))
print('Random learning after 3000 cycles: {:.4f}'.format(random_result[-1]))
print('Percentage improvement {:.2f}%'.format((random_result[-1] - entropy_result[-1])/np.mean([entropy_result[-1],
                                                                random_result[-1]])*100))
print('{:.4f} > {:.4f} > {:.4f}'.format(entropy_result[1361], random_result[-1], entropy_result[1362]))
print('Reached same as random 3000, in 1361 steps. {:.2f} fold improvement'.format((3600-1361)/1361))<jupyter_output>Entropy learning after 3000 cycles: 0.0413
Random learning after 3000 cycles: 0.0540
Percentage improvement 26.68%
0.0541 > 0.0540 > 0.0539
Reached same as random 3000, in 1361 steps. 1.65 fold improvement
{'fraction_non_alphanumeric': 0.1554267650158061, 'fraction_numerical': 0.10010537407797682, 'mean_word_length': 4.737160120845921, 'pattern_counts': {'":': 0, '<': 4, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '517077', 'license': 'MIT', 'n_tokens_mistral': 808, 'n_tokens_neox': 664, 'n_words': 163, 'path': 'paper/notebooks/active-learning.ipynb', 'repo_name': 'keeeto/gp-net', 'size': '1898'}