In [2]:
%cd /Users/balandat/Documents/Code/eclipse workspace/cont_no_regret
import ContNoRegret
from ContNoRegret.utils import plot_loglogs, plot_snapshots, plot_results
from ContNoRegret.animate import save_animations
import matplotlib
import matplotlib.pyplot as plt
import pickle
import os
In [17]:
folder = '/Users/balandat/Documents/Code/Continuous_No-Regret/results/'
file = '2015-05-25_21-35/NIPS2_CNR_pexp_comparison_Quadratic.piggl'
with open(folder+file, 'rb') as f:
results = pickle.load(f)
results = {r.label : r for r in results}
print(list(results.keys()))
In [13]:
results = [{key:res for key,res in results.items() if 'p={1.25}' in key},
{key:res for key,res in results.items() if 'p={1.5}' in key},
{key:res for key,res in results.items() if 'p={1.75}' in key}]
In [16]:
plot_u0s([{key:res for key,res in results[2].items() if 'pExpPot' in key},
{key:res for key,res in results[2].items() if 'ExpPPot' in key}])
In [22]:
plot_u0s([results], bounds=False)
In [3]:
folder = '/Users/balandat/Documents/Code/Continuous_No-Regret/results/2015-05-27_11-48/'
file = 'NIPS2_CNR_PolyNormBounds_Polynomial.piggl'
with open(folder+file, 'rb') as f:
results = pickle.load(f)
results = {r.label : r for r in results}
print(list(results.keys()))
In [4]:
plot_loglogs([results], directory=None)
In [15]:
folder = '/Users/balandat/Documents/Code/Continuous_No-Regret/individ_results/dimension'
pots = ['ExpPot', 'pNormPot', 'FTAL', 'OGD', 'ONS', 'GP', 'EWOO']
results = {pot:[] for pot in pots}
for pot in pots:
for filename in os.listdir(folder):
if pot in filename:
with open('{}/{}'.format(folder, filename), 'rb') as f:
res = pickle.load(f)
res.label = filename.strip('piggl')
results[pot].append(res)
In [16]:
plot_results(results['pNormPot'])
In [48]:
dd = results['ExpPot'][0].regs_norate['tsavg'][0] / results['ExpPot'][1].regs_norate['tsavg'][0]
In [49]:
import matplotlib.pyplot as plt
plt.plot(dd)
Out[49]:
In [9]:
folder = '/Users/balandat/Documents/Code/Continuous_No-Regret/results/2015-05-27_08-36/'
file = 'NIPS2_CNR_vs_Quadratic.piggl'
with open(folder+file, 'rb') as f:
results = pickle.load(f)
results = {r.label : r for r in results}
print(list(results.keys()))
In [10]:
res = [[res for key,res in results.items() if ' ExpPot' in key],
[res for key,res in results.items() if 'pExpPot' in key],
[res for key,res in results.items() if 'pNormPot' in key]]
pNres = [{key:res for key,res in results.items() if 'pNormPot, '+p in key} for p in ['$p={1.05}$', '$p={1.75}$']]
Expres = [{key:res for key,res in results.items() if ' ExpPot' in key}]
pNlabels = [[r.label.replace('pNormPot, ','') for r in rs.values()] for rs in pNres]
plot_loglogs(pNres, directory=None, bounds=True)
In [9]:
plot_snapshots([val for val in results.values()], [10, 100, 225], show=True, directory=folder, figsize=(16,8),
elev=30, azim=120)
Out[9]:
In [9]:
folder = '/Users/balandat/Documents/Code/Continuous_No-Regret/results/2015-05-27_11-31/'
file = 'NIPS2_CNR_greedyfail_Affine.piggl'
with open(folder+file, 'rb') as f:
results = pickle.load(f)
results = {r.label : r for r in results}
print(list(results.keys()))
In [10]:
res2 = {key:results[key] for key in results.keys() if key!='ExpPPot, $p={1.5}, gamma={1}$'}
In [12]:
plot_loglogs([res2], directory=folder, loc='upper center')
In [ ]: