Table 8 (G3) Data augmentation in supervised setting on other datasets.
import pathlib
import pandas as pd
AUGMENTATIONS_ORDER = [
"noaug",
"rotate",
"horizontalflip",
"colorjitter",
"packetloss",
"timeshift",
"changertt",
]
RENAME = {
"noaug": "No augmentation",
"changertt": "Change RTT",
"horizontalflip": "Horizontal flip",
"colorjitter": "Color jitter",
"packetloss": "Packet loss",
"rotate": "Rotate",
"timeshift": "Time shift",
}
def load_summary_report(fname, level0):
df = pd.read_csv(fname, header=[0, 1], index_col=[0, 1]).droplevel(0, axis=0)
df = df["f1"]
df = df[["mean", "ci95"]]
df = df.loc[AUGMENTATIONS_ORDER].rename(RENAME)
df.columns = pd.MultiIndex.from_arrays([[level0, level0], df.columns])
return df
df = pd.concat(
(
load_summary_report(
"campaigns/mirage22/augmentation-at-loading-no-dropout/minpkts10/campaign_summary/augment-at-loading/summary_flowpic_dim_32.csv",
"mirage22 - minpkts10",
),
load_summary_report(
"campaigns/mirage22/augmentation-at-loading-no-dropout/minpkts1000/campaign_summary/augment-at-loading/summary_flowpic_dim_32.csv",
"mirage22 - minpkts1000",
),
load_summary_report(
"campaigns/utmobilenet21/augmentation-at-loading-no-dropout/minpkts10/campaign_summary/augment-at-loading/summary_flowpic_dim_32.csv",
"utmobilenet21 - minpkts10",
),
load_summary_report(
"campaigns/mirage19/augmentation-at-loading-no-dropout/minpkts10/campaign_summary/augment-at-loading/summary_flowpic_dim_32.csv",
"mirage19 - minpkts10",
),
),
axis=1,
)
df = (df * 100).round(2)
display(df)
df.to_csv("table8_augmentation-at-loading_on_other_datasets.csv")