Table 7: Accuracy on 32x32 flowpic when enlarging the training set (w/o Dropout)
import itertools
import pathlib
import pandas as pd
RENAME = {
"noaug": "No augmentation",
"rotate": "Rotate",
"horizontalflip": "Horizontal flip",
"colorjitter": "Color jitter",
"packetloss": "Packet loss",
"timeshift": "Time shift",
"changertt": "Change RTT",
}
folder = pathlib.Path("campaigns/ucdavis-icdm19/larger-trainset/")
df_sup = pd.read_csv(
folder
/ "augmentation-at-loading/campaign_summary/augment-at-loading-larger-trainset/summary_flowpic_dim_32.csv",
header=[0, 1],
index_col=[0, 1],
)
df_sup = df_sup["acc"][["mean", "ci95"]]
df_sup.index.set_names(["test_split_name", "aug_name"], inplace=True)
df_sup = df_sup.reset_index().pivot(
columns=["test_split_name"], index="aug_name", values=["mean", "ci95"]
)
df_sup.columns.set_names(["stat", "test_split_name"], inplace=True)
df_sup = df_sup.reorder_levels(["test_split_name", "stat"], axis=1)
df_sup = df_sup[
list(itertools.product(["test-script", "test-human"], ["mean", "ci95"]))
]
df_sup = df_sup.rename(RENAME, axis=0).rename(RENAME, axis=1)
df_sup.index.set_names([""], inplace=True)
df_sup.columns.set_names(["", ""], inplace=True)
df_sup = df_sup.round(2)
df_sup = df_sup.loc[list(RENAME.values())]
df_sup.to_csv("table7_larger-trainset_augment-at-loading.csv")
df_sup
df_cl = pd.read_csv(
folder
/ "simclr/campaign_summary/simclr-larger-trainset/summary_flowpic_dim_32.csv",
header=[0, 1],
index_col=[0, 1],
)
df_cl = df_cl["acc"][["mean", "ci95"]]
df_cl = df_cl.droplevel(1, axis=0).round(2)
df_cl = df_cl.loc[["test-script", "test-human"]]
df_cl.to_csv("table7_larger-trainset_simclr.csv")
df_cl