<jupyter_start><jupyter_text>80-100%<jupyter_code>fig2 = plt.figure(constrained_layout=True, figsize=(16,10))
spec2 = gridspec.GridSpec(ncols=3, nrows=2, figure=fig2)
f2_ax1 = fig2.add_subplot(spec2[0, 0])
# f2_ax2 = fig2.add_subplot(spec2[0, 1])

axes = [f2_ax1]

# nps_x = [0]+noise_pcts
nps_x = [80,90,95,96,97,98,99,100]
for i in range(1):
    # NSL
    nsl_acc, nsl_err = get_nsl_high_results('softmax', datasets[i])
    axes[i].plot(nps_x, nsl_acc, label = "NSL Softmax 320 examples", color="b", linestyle='-.')
    axes[i].errorbar(nps_x, nsl_acc, yerr=nsl_err, color="b", capsize=5,linestyle='-.')
    
    nsl_acc, nsl_err = get_nsl_high_results('edl_gen', datasets[i])
    axes[i].plot(nps_x, nsl_acc, label = "NSL EDL-GEN 320 examples", color="k", linestyle='-.')
    axes[i].errorbar(nps_x, nsl_acc, yerr=nsl_err, color="k", capsize=5,linestyle='-.')
    
    
    nsl_acc, nsl_err = get_nsl_high_results('constant_softmax', datasets[i])
    axes[i].plot(nps_x, nsl_acc, label = "NSL Softmax (constant penalty) 320 examples", color="r", linestyle=':')
    axes[i].errorbar(nps_x, nsl_acc, yerr=nsl_err, color="r", capsize=5,linestyle=':')
    
    nsl_acc, nsl_err = get_nsl_high_results('constant_edl_gen', datasets[i])
    axes[i].plot(nps_x, nsl_acc, label = "NSL EDL-GEN (constant penalty) 320 examples", color="g", linestyle=':')
    axes[i].errorbar(nps_x, nsl_acc, yerr=nsl_err, color="g", capsize=5,linestyle=':')
    
    
    axes[i].set_xticks(nps_x)
    #axes[i].set_yticks(np.arange(0.45,1.01,0.05))
    axes[i].set_xlabel('Training ex. subject to distributional shift (%)', fontsize=FONT_SIZE)
    axes[i].set_ylabel('Structured test set accuracy', fontsize=FONT_SIZE)
#     axes[i].set_title(datasets[i])
    axes[i].grid(True)
    
       

    
# Set legend
# f2_ax2.legend(*axes[0].get_legend_handles_labels(), loc='center')
# f2_ax2.get_xaxis().set_visible(False)
# f2_ax2.get_yaxis().set_visible(False)
# f2_ax2.set_title('Legend')
plt.legend()
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1789786812097174, 'fraction_numerical': 0.04015865146256817, 'mean_word_length': 5.30625, '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': '342854', 'license': 'MIT', 'n_tokens_mistral': 933, 'n_tokens_neox': 876, 'n_words': 125, 'path': 'examples/sudoku_9x9/paper_results/graphs/Structured Accuracy constant penalties.ipynb', 'repo_name': 'DanCunnington/FFNSL', 'size': '2017'}