hw3: fix
This commit is contained in:
parent
a2bf9591df
commit
ae30030661
5 changed files with 5 additions and 2 deletions
Binary file not shown.
Before Width: | Height: | Size: 48 KiB |
BIN
Claudio_Maggioni_3/1-4-ys-large.png
Normal file
BIN
Claudio_Maggioni_3/1-4-ys-large.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
Binary file not shown.
|
@ -65,7 +65,7 @@ generate these plots can be found in section 1.3 of \texttt{main.m}.
|
|||
\end{subfigure}
|
||||
\begin{subfigure}{0.5\textwidth}
|
||||
\resizebox{\textwidth}{\textwidth}{\input{ex1-3-gd}}
|
||||
\caption{Complete plot}
|
||||
\caption{Complete plot (the blue line is GD with $\alpha = 1$)}
|
||||
\end{subfigure}
|
||||
\caption{Steps in the energy landscape for Newton and GD methods}\label{fig:1}
|
||||
\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}}
|
||||
\caption{Gradient norms}
|
||||
\end{subfigure}
|
||||
\hfill
|
||||
\begin{subfigure}{0.45\textwidth}
|
||||
\centering
|
||||
\resizebox{\textwidth}{\textwidth}{\includegraphics{1-4-ys-large.jpg}}
|
||||
\resizebox{\textwidth}{\textwidth}{\includegraphics{1-4-ys-large.png}}
|
||||
\caption{Objective function values}
|
||||
\end{subfigure}
|
||||
\caption{Gradient norms and objective function values (y-axes) w.r.t.
|
||||
|
|
|
@ -143,7 +143,9 @@ matlab2tikz('showInfo', false, './ex1-4-ys.tex');
|
|||
figure;
|
||||
|
||||
semilogy(0:size(xs3, 2)-1, ys3, 'Marker', '.');
|
||||
hold on
|
||||
semilogy(0:size(xs4, 2)-1, ys4, 'Marker', '.');
|
||||
hold off
|
||||
|
||||
legend('GD + backtracking', 'GD (alpha=1)')
|
||||
sgtitle("Objective function value w.r.t. iteration number for Newton and GD methods");
|
||||
|
|
Reference in a new issue