In [3]:
%load_ext autoreload
%autoreload 2
import os
import numpy as np
import pandas as pd
from browser import *
In [4]:
exps = [
'C100_DenseBest',
'C100_DenseBest_Linear',
'C100_SparseBest',
'C100_SparseBest_Linear',
]
paths = [os.path.expanduser("~/nta/results/{}".format(e)) for e in exps]
df = load_many(paths)
In [5]:
df.shape
Out[5]:
In [7]:
df.head()
Out[7]:
In [14]:
(df.groupby(['dataset', 'name'])['test_accuracy_max', 'noise_accuracy_max',
'mean_accuracy_max', 'epochs']
.max().round(4))
Out[14]:
In [15]:
(df.groupby(['dataset', 'name'])['test_accuracy_max', 'noise_accuracy_max',
'mean_accuracy_max', 'epochs']
.mean().round(4))
Out[15]:
In [16]:
def stats(arr):
mean = np.mean(arr)
std = np.std(arr)
return [round(v, 4) for v in [mean-std, mean, mean+std]]
tunable_params = ['linear_percent_on']
In [29]:
# CIFAR-10 SPARSE
filters = ((df['name']=='C100_SparseBest_Linear'))
(df[filters]
.sort_values('mean_accuracy_max', ascending=False)[tunable_params]
.head(4)
.apply(stats))
Out[29]:
In [30]:
# CIFAR-10 SPARSE
filters = ((df['name']=='C100_SparseBest_Linear'))
(df[filters]
.sort_values('mean_accuracy_max', ascending=False)[tunable_params]
.tail(4)
.apply(stats))
Out[30]:
In [32]:
exps = [
'C100_SparseBest_Linear1_T',
'C100_SparseBest_Linear2_T',
]
paths = [os.path.expanduser("~/nta/results/{}".format(e)) for e in exps]
df = load_many(paths)
In [33]:
df.shape
Out[33]:
In [42]:
df.head(20)
Out[42]:
In [35]:
(df.groupby(['dataset', 'name'])['test_accuracy_max', 'noise_accuracy_max',
'mean_accuracy_max', 'epochs']
.max().round(4))
Out[35]:
In [36]:
(df.groupby(['dataset', 'name'])['test_accuracy_max', 'noise_accuracy_max',
'mean_accuracy_max', 'epochs']
.mean().round(4))
Out[36]:
In [46]:
tunable_params = ['weight_sparsity']
In [68]:
# CIFAR-10 SPARSE
filters = ((df['name']=='C100_SparseBest_Linear1_T'))
(df[filters]
.sort_values('mean_accuracy_max', ascending=False)[tunable_params]
.head(3)
.apply(stats))
Out[68]:
In [69]:
# CIFAR-10 SPARSE
filters = ((df['name']=='C100_SparseBest_Linear1_T'))
(df[filters]
.sort_values('mean_accuracy_max', ascending=False)[tunable_params]
.tail(3)
.apply(stats))
Out[69]:
In [70]:
# CIFAR-10 SPARSE
filters = ((df['name']=='C100_SparseBest_Linear2_T'))
(df[filters]
.sort_values('mean_accuracy_max', ascending=False)[tunable_params]
.head(3)
.apply(stats))
Out[70]:
In [71]:
# CIFAR-10 SPARSE
filters = ((df['name']=='C100_SparseBest_Linear2_T'))
(df[filters]
.sort_values('mean_accuracy_max', ascending=False)[tunable_params]
.tail(3)
.apply(stats))
Out[71]:
In [ ]: