This commit is contained in:
Claudio Maggioni (maggicl) 2021-04-23 15:36:34 +02:00
parent a2bf9591df
commit ae30030661
5 changed files with 5 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -65,7 +65,7 @@ generate these plots can be found in section 1.3 of \texttt{main.m}.
\end{subfigure} \end{subfigure}
\begin{subfigure}{0.5\textwidth} \begin{subfigure}{0.5\textwidth}
\resizebox{\textwidth}{\textwidth}{\input{ex1-3-gd}} \resizebox{\textwidth}{\textwidth}{\input{ex1-3-gd}}
\caption{Complete plot} \caption{Complete plot (the blue line is GD with $\alpha = 1$)}
\end{subfigure} \end{subfigure}
\caption{Steps in the energy landscape for Newton and GD methods}\label{fig:1} \caption{Steps in the energy landscape for Newton and GD methods}\label{fig:1}
\end{figure} \end{figure}
@ -96,9 +96,10 @@ generate these plots can be found in section 1.4 of \texttt{main.m}.
\resizebox{\textwidth}{\textwidth}{\includegraphics{1-4-grad-large.jpg}} \resizebox{\textwidth}{\textwidth}{\includegraphics{1-4-grad-large.jpg}}
\caption{Gradient norms} \caption{Gradient norms}
\end{subfigure} \end{subfigure}
\hfill
\begin{subfigure}{0.45\textwidth} \begin{subfigure}{0.45\textwidth}
\centering \centering
\resizebox{\textwidth}{\textwidth}{\includegraphics{1-4-ys-large.jpg}} \resizebox{\textwidth}{\textwidth}{\includegraphics{1-4-ys-large.png}}
\caption{Objective function values} \caption{Objective function values}
\end{subfigure} \end{subfigure}
\caption{Gradient norms and objective function values (y-axes) w.r.t. \caption{Gradient norms and objective function values (y-axes) w.r.t.

View file

@ -143,7 +143,9 @@ matlab2tikz('showInfo', false, './ex1-4-ys.tex');
figure; figure;
semilogy(0:size(xs3, 2)-1, ys3, 'Marker', '.'); semilogy(0:size(xs3, 2)-1, ys3, 'Marker', '.');
hold on
semilogy(0:size(xs4, 2)-1, ys4, 'Marker', '.'); semilogy(0:size(xs4, 2)-1, ys4, 'Marker', '.');
hold off
legend('GD + backtracking', 'GD (alpha=1)') legend('GD + backtracking', 'GD (alpha=1)')
sgtitle("Objective function value w.r.t. iteration number for Newton and GD methods"); sgtitle("Objective function value w.r.t. iteration number for Newton and GD methods");