In [3]:
%load_ext autoreload
%autoreload 2

import os
import numpy as np
import pandas as pd

from browser import *


The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload

In [4]:
exps = [
    'C100_DenseBest_F',
    'C100_DenseBest_Linear1_F',
    'C100_SparseBest_F',
    'C100_SparseBest_Linear1_F',
]

paths = [os.path.expanduser("~/nta/results/{}".format(e)) for e in exps]
df = load_many(paths)

In [5]:
df.shape


Out[5]:
(40, 62)

In [32]:
def mean_and_std(s):
    return "{:.4f} ± {:.4f}".format(s.mean(), s.std())

(df.groupby(['dataset', 'name'])
     .agg({'test_accuracy_max': [mean_and_std], 
           'mean_accuracy_max': [mean_and_std],
           'noise_accuracy_max': [mean_and_std]}))


Out[32]:
test_accuracy_max mean_accuracy_max noise_accuracy_max
mean_and_std mean_and_std mean_and_std
dataset name
CIFAR100 C100_DenseBest_F 0.7257 ± 0.0023 0.4635 ± 0.0042 0.2190 ± 0.0078
C100_DenseBest_Linear1_F 0.7248 ± 0.0026 0.4568 ± 0.0049 0.2046 ± 0.0089
C100_SparseBest_F 0.6985 ± 0.0019 0.4645 ± 0.0031 0.2607 ± 0.0084
C100_SparseBest_Linear1_F 0.6964 ± 0.0029 0.4634 ± 0.0032 0.2676 ± 0.0119

In [33]:
(df.groupby(['dataset', 'name'])
     .agg({'test_accuracy_max': ['max','mean', 'std'], 
           'mean_accuracy_max': ['max', 'mean', 'std'],
           'noise_accuracy_max': ['max', 'mean', 'std']})
     .round(4))


Out[33]:
test_accuracy_max mean_accuracy_max noise_accuracy_max
max mean std max mean std max mean std
dataset name
CIFAR100 C100_DenseBest_F 0.7296 0.7257 0.0023 0.4709 0.4635 0.0042 0.2371 0.2190 0.0078
C100_DenseBest_Linear1_F 0.7294 0.7248 0.0026 0.4642 0.4568 0.0049 0.2206 0.2046 0.0089
C100_SparseBest_F 0.7013 0.6985 0.0019 0.4682 0.4645 0.0031 0.2740 0.2607 0.0084
C100_SparseBest_Linear1_F 0.7020 0.6964 0.0029 0.4684 0.4634 0.0032 0.2830 0.2676 0.0119

In [ ]: