validation-curve.tex 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. \documentclass[border=2pt]{standalone}
  2. \usepackage[utf8]{inputenc} % this is needed for umlauts
  3. \usepackage[ngerman]{babel} % this is needed for umlauts
  4. \usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
  5. \usepackage[margin=2.5cm]{geometry} %layout
  6. \usepackage{tikz}
  7. \usepackage{pgfplots}
  8. \pgfplotsset{compat=1.13}
  9. \begin{document}
  10. \definecolor{c1}{HTML}{0072B2}
  11. \definecolor{c2}{HTML}{009E73}
  12. \definecolor{c3}{HTML}{CB0000}
  13. \begin{tikzpicture}
  14. \pgfplotsset{
  15. scale only axis,
  16. % scaled x ticks=base 10:3,
  17. xmin=0, xmax=171,
  18. width=15cm, height=8cm, % size of the image
  19. }
  20. \begin{axis}[
  21. axis y line*=left,
  22. ymin=0.15,
  23. % ymax=26000,
  24. grid = major,
  25. grid style={dashed, gray!30},
  26. ylabel=validation accuracy,
  27. legend style={at={(0.5,0.1)},anchor=south},
  28. % ylabel style={at={(0,1.0)} },
  29. xlabel=epoch,
  30. % legend style={at={(0.3,0.2)}, anchor=north},
  31. % legend cell align=right,
  32. xticklabel style=
  33. {/pgf/number format/1000 sep=,rotate=60,anchor=east,font=\scriptsize},
  34. ]
  35. \addplot[thick, c1, mark=., densely dashed] table [x=epoch, y=max_acc, col sep=comma] {baseline_cifar_test_acc.csv};\label{plot_one}\addlegendentry{maximum validation accuracy}
  36. \addplot[thick, c2, mark=.] table [x=epoch,y=min_acc, col sep=comma] {baseline_cifar_test_acc.csv};\label{plot_two}\addlegendentry{minimum validation accuracy}
  37. \end{axis}
  38. \begin{axis}[
  39. axis y line*=right,
  40. axis x line=none,
  41. % xmin=0,
  42. % xmax=171,
  43. % ymin=0, ymax=100,
  44. ylabel=loss,
  45. legend style={at={(0.5,0.1)},anchor=south},
  46. y dir=reverse
  47. ]
  48. \addlegendimage{thick, c1, mark=., densely dashed}\addlegendentry{maximum validation accuracy}
  49. \addlegendimage{thick, c2, mark=.}\addlegendentry{minimum validation accuracy}
  50. \addplot[thick, c3, mark=., dotted] table [x=epoch,y=mean_loss, col sep=comma] {baseline_cifar_test_acc.csv};
  51. \addlegendentry{mean loss}
  52. \end{axis}
  53. \end{tikzpicture}
  54. \end{document}