diff --git a/ex-6/plots/edm-round.py b/ex-6/plots/edm-round.py new file mode 100644 index 0000000..47c9835 --- /dev/null +++ b/ex-6/plots/edm-round.py @@ -0,0 +1,40 @@ +import numpy as np +import matplotlib.pyplot as plt + + +def plot(table, title='', log=False): + plt.figure() + plt.suptitle(title) + + plt.subplot(211) + if log: + plt.xscale('log') + plt.title('EDM distance' + ' '*10, loc='right') + + plt.plot(table[0], table[1], color='#92182b') + plt.tick_params(axis='y', labelcolor='#92182b') + plt.ylabel('average', color='#92182b') + plt.ticklabel_format(style='sci', axis='y', scilimits=(0, 0)) + + twin = plt.twinx() + twin.plot(table[0], table[2], color='gray') + twin.tick_params(axis='y', labelcolor='gray') + twin.set_ylabel('standard deviation', color='gray') + twin.ticklabel_format(style='sci', axis='y', scilimits=(0, 0)) + + plt.subplot(212) + if log: + plt.xscale('log') + plt.title('skewness', loc='right') + plt.xlabel('RL rounds') + plt.plot(table[0], table[3], color='xkcd:gray') + + +plt.rcParams['font.size'] = 12 +table = np.loadtxt('ex-6/plots/edm-round.txt') + +plot(table[:27].T, title='noiseless', log=True) +plot(table[27:47].T, title=r'$\sigma=0.005$') +plot(table[47:67].T, title=r'$\sigma=0.01$') +plot(table[67:].T, title=r'$\sigma=0.05$') +plt.show() diff --git a/ex-6/plots/edm-round.txt b/ex-6/plots/edm-round.txt new file mode 100644 index 0000000..06b8178 --- /dev/null +++ b/ex-6/plots/edm-round.txt @@ -0,0 +1,92 @@ +#rounds mean stddev skew +#σ = 0 + 1 2.43e-4 1.3e-5 0.22 + 2 1.67e-4 1.3e-5 0.27 + 3 1.52e-4 1.3e-5 0.29 + 4 1.43e-4 1.3e-5 0.29 + 5 1.36e-4 1.2e-5 0.28 + 6 1.31e-4 1.2e-5 0.29 + 7 1.26e-4 1.2e-5 0.29 + 8 1.22e-4 1.2e-5 0.30 + 9 1.19e-4 1.2e-5 0.31 + 10 1.16e-4 1.2e-5 0.33 + 11 1.13e-4 1.2e-5 0.34 + 12 1.11e-4 1.2e-5 0.34 + 13 1.09e-4 1.2e-5 0.36 + 14 1.07e-4 1.1e-5 0.36 + 15 1.05e-4 1.1e-5 0.36 + 16 1.03e-4 1.1e-5 0.37 + 17 1.01e-4 1.1e-5 0.37 + 18 9.97e-5 1.1e-5 0.37 + 19 9.82e-5 1.1e-5 0.37 + 20 9.68e-5 1.1e-5 0.37 + 40 7.74e-5 1.0e-5 0.35 + 60 6.57e-5 9.4e-6 0.32 + 80 5.78e-5 9.1e-6 0.30 + 100 5.20e-5 9.0e-6 0.30 + 400 3.61e-5 1.0e-5 0.33 + 800 3.60e-5 1.0e-5 0.33 +1600 3.60e-5 1.0e-5 0.33 +#σ=0.005 + 1 2.92e-04 4.7e-05 1.43 + 2 2.18e-04 4.7e-05 1.72 + 3 2.28e-04 4.5e-05 1.73 + 4 2.12e-04 4.8e-05 1.72 + 5 2.08e-04 4.8e-05 1.71 + 6 2.02e-04 4.9e-05 1.69 + 7 2.05e-04 4.9e-05 1.70 + 8 2.00e-04 4.9e-05 1.69 + 9 1.98e-04 5.0e-05 1.68 +10 1.95e-04 5.0e-05 1.67 +11 1.97e-04 5.0e-05 1.68 +12 1.94e-04 5.0e-05 1.67 +13 1.93e-04 5.0e-05 1.67 +14 1.92e-04 5.0e-05 1.67 +15 1.91e-04 5.1e-05 1.66 +16 1.90e-04 5.1e-05 1.66 +17 1.90e-04 5.1e-05 1.66 +18 1.89e-04 5.1e-05 1.66 +19 1.88e-04 5.1e-05 1.66 +20 1.88e-04 5.1e-05 1.66 +#σ = 0.01 + 1 3.47e-04 1.0e-04 1.58 + 2 3.96e-04 1.1e-04 1.53 + 3 3.39e-04 1.1e-04 1.56 + 4 3.42e-04 1.1e-04 1.57 + 5 3.34e-04 1.1e-04 1.55 + 6 3.35e-04 1.1e-04 1.55 + 7 3.37e-04 1.1e-04 1.55 + 8 3.33e-04 1.1e-04 1.55 + 9 3.33e-04 1.1e-04 1.55 +10 3.32e-04 1.1e-04 1.55 +11 3.32e-04 1.1e-04 1.54 +12 3.31e-04 1.1e-04 1.54 +13 3.31e-04 1.1e-04 1.54 +14 3.31e-04 1.1e-04 1.54 +15 3.31e-04 1.1e-04 1.55 +16 3.31e-04 1.1e-04 1.55 +17 3.31e-04 1.1e-04 1.55 +18 3.31e-04 1.1e-04 1.55 +19 3.31e-04 1.1e-04 1.55 +20 3.31e-04 1.1e-04 1.55 +#σ=0.05 + 1 1.49e-03 5.7e-04 1.38 + 2 1.51e-03 5.6e-04 1.41 + 3 1.50e-03 5.7e-04 1.39 + 4 1.50e-03 5.6e-04 1.40 + 5 1.52e-03 5.6e-04 1.42 + 6 1.53e-03 5.6e-04 1.43 + 7 1.52e-03 5.6e-04 1.43 + 8 1.51e-03 5.6e-04 1.42 + 9 1.54e-03 5.5e-04 1.45 +10 1.53e-03 5.5e-04 1.44 +11 1.53e-03 5.5e-04 1.44 +12 1.54e-03 5.5e-04 1.45 +13 1.54e-03 5.5e-04 1.45 +14 1.54e-03 5.5e-04 1.46 +15 1.55e-03 5.5e-04 1.46 +16 1.55e-03 5.5e-04 1.46 +17 1.55e-03 5.5e-04 1.47 +18 1.56e-03 5.5e-04 1.47 +19 1.56e-03 5.4e-04 1.47 +20 1.56e-03 5.4e-04 1.48 diff --git a/notes/images/edm-hist-0.005.pdf b/notes/images/edm-hist-0.005.pdf new file mode 100644 index 0000000..6fa0f0d Binary files /dev/null and b/notes/images/edm-hist-0.005.pdf differ diff --git a/notes/images/edm-hist-0.01.pdf b/notes/images/edm-hist-0.01.pdf new file mode 100644 index 0000000..88825d7 Binary files /dev/null and b/notes/images/edm-hist-0.01.pdf differ diff --git a/notes/images/edm-hist-0.05.pdf b/notes/images/edm-hist-0.05.pdf new file mode 100644 index 0000000..829ffd0 Binary files /dev/null and b/notes/images/edm-hist-0.05.pdf differ diff --git a/notes/images/edm-hist-0.pdf b/notes/images/edm-hist-0.pdf new file mode 100644 index 0000000..c3b2aed Binary files /dev/null and b/notes/images/edm-hist-0.pdf differ