<jupyter_start><jupyter_text>---<jupyter_code>filename = "cifar10_wrn_multihead_dual_tasks_[6, 7]_[2, 3]"
df = pd.read_csv("/Users/ashwindesilva/research/ood-tl/experiments/results/{}.csv".format(filename))
n = 100
df["m"] = df["m"]/n
del df["Unnamed: 0"]
dfm = df.melt(['m', 'r'], var_name='Task', value_name='Risk')
fig, axs = plt.subplots(1, 2, figsize=(20, 10), facecolor='white')

ax = sns.lineplot(data=dfm, x="m", y="Risk", hue="Task", ax=axs[0], markers=True, ci=95, lw=2)
ax.set_ylabel(r"$L_{m, n, \Delta}$")
ax.set_xlabel(r"$m/n, n = 100$")
ax.set_xlim([0, 40])
ax.set_title("Frog vs. Horse - Bird vs. Cat")

ax = sns.lineplot(data=df, x="m", y=str(0), hue="r", palette=sns.color_palette(['black'], len(df["r"].unique())), ax=axs[1], estimator=None, lw=0.7, alpha=0.5, legend=False)
ax = sns.lineplot(data=df, x="m", y=str(0), ax=ax, markers=True, color='r', err_style="bars", lw=3)
ax.set_ylabel(r"$L_{m, n}$")
ax.set_xlim([0, 40])
ax.set_ylabel(r"$L_{m, n}$")
ax.set_xlabel(r"$m/n, n=100$")
ax.set_title("Frog vs. Horse - Bird vs. Cat")

axs[0].set_ylim(ax.get_ylim())
fig.savefig("/Users/ashwindesilva/research/ood-tl/reports/figures/{}.svg".format(filename), bbox_inches="tight")<jupyter_output><empty_output><jupyter_text>---<jupyter_code>filename1 = "cifar10_WideResNet_multihead_larger_m/cifar10_wrn_multihead_dual_tasks_T1"
filename2 = "cifar10_WideResNet_multihead_larger_m/cifar10_wrn_multihead_dual_tasks_T2"
filename3 = "cifar10_WideResNet_multihead_larger_m/cifar10_wrn_multihead_dual_tasks_T3"
filename4 = "cifar10_WideResNet_multihead_larger_m/cifar10_wrn_multihead_dual_tasks_T4"
filename5 = "cifar10_WideResNet_multihead_larger_m/cifar10_wrn_multihead_dual_tasks_T5"
df1 = pd.read_csv("/Users/ashwindesilva/research/ood-tl/experiments/results/{}.csv".format(filename1))
df2 = pd.read_csv("/Users/ashwindesilva/research/ood-tl/experiments/results/{}.csv".format(filename2))
df3 = pd.read_csv("/Users/ashwindesilva/research/ood-tl/experiments/results/{}.csv".format(filename3))
df4 = pd.read_csv("/Users/ashwindesilva/research/ood-tl/experiments/results/{}.csv".format(filename4))
df5 = pd.read_csv("/Users/ashwindesilva/research/ood-tl/experiments/results/{}.csv".format(filename5))
# n = 100
# df1["m"] = df1["m"]/n
# df2["m"] = df2["m"]/n
# df3["m"] = df3["m"]/n
# df4["m"] = df4["m"]/n
# df5["m"] = df5["m"]/n
dfs = [df1, df2, df3, df4, df5]
fig, axs = plt.subplots(5, 5, figsize=(25, 25), facecolor='white')
for i, df in enumerate(dfs):
    for j in range(5):
        axs[i][j].set_ylabel(" ")
        if i == 0:
            axs[i][j].set_title("Task {}".format(j+1), fontsize=25)
        if j == 0:
            axs[i][j].set_ylabel("Task {}".format(i+1), fontsize=25)
        if j == i:
            axs[i][j].axis('off')
            if i == 0: 
                axs[i][j].axis('on')
                axs[i][j].set_ylabel("Task 1",fontsize=25)
                axs[i][j].xaxis.set_visible(False)
                axs[i][j].patch.set_visible(False)
                axs[i][j].set_ylim([0.10, 0.36])
                axs[i][j].tick_params(axis='y', colors='white')
            continue
        ax = sns.lineplot(data=df, x="m", y=str(j+1), ax=axs[i][j], markers=True, color='r', lw=3)
        ax.set_xlim([0, 90])
        ax.set_ylim([0.10, 0.40])
        ax.set_xlabel(r"$m/n, n=100$")
filename = "cifar_wrn_multihead_larger_m"
fig.savefig("/Users/ashwindesilva/research/ood-tl/reports/figures/{}.svg".format(filename), bbox_inches="tight")<jupyter_output><empty_output><jupyter_text>---<jupyter_code>filename = "cifar10_WideResNet_multihead_larger_m/cifar10_wrn_multihead_dual_tasks_T2_T1"
df = pd.read_csv("/Users/ashwindesilva/research/ood-tl/experiments/results/{}.csv".format(filename))
del df["Unnamed: 0"]
dfm = df.melt(['m', 'r'], var_name='Task', value_name='Risk')
fig, axs = plt.subplots(1, 2, figsize=(20, 10), facecolor='white')

ax = sns.lineplot(data=dfm, x="m", y="Risk", hue="Task", ax=axs[0], markers=True, ci=95, lw=2)
ax.set_ylabel(r"$L_{m, n, \Delta}$")
ax.set_xlabel(r"$m/n, n = 100$")
ax.set_xlim([0, 90])
ax.set_title("Frog vs. Horse - Bird vs. Cat")

ax = sns.lineplot(data=df, x="m", y=str(1), hue="r", palette=sns.color_palette(['black'], len(df["r"].unique())), ax=axs[1], estimator=None, lw=0.7, alpha=0.5, legend=False)
ax = sns.lineplot(data=df, x="m", y=str(1), ax=ax, markers=True, color='r', err_style="bars", lw=3)
ax.set_ylabel(r"$L_{m, n}$")
ax.set_xlim([0, 90])
ax.set_ylabel(r"$L_{m, n}$")
ax.set_xlabel(r"$m/n, n=100$")
ax.set_title("Frog vs. Horse - Bird vs. Cat")

axs[0].set_ylim(ax.get_ylim())<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.21655773420479302, 'fraction_numerical': 0.0383442265795207, 'mean_word_length': 5.121333333333333, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '378556', 'license': 'MIT', 'n_tokens_mistral': 2146, 'n_tokens_neox': 2011, 'n_words': 264, 'path': 'notebooks/quick_visualize.ipynb', 'repo_name': 'neurodata/ood-tl', 'size': '4590'}