\begin{figure}
    \centering
    \begin{tikzpicture}[every node/.style={minimum size=0.7cm},on grid,scale=0.47,transform shape]
    
    \draw [gray] (7.6,1.5) -- (7.6,-6);
    \node[anchor=east] at (5.5,1) {\scalebox{1.5}{{Ridge Regression}}};
    \node[anchor=west] at (10,1) {\scalebox{1.5}{{Gradient Descent}}};
    
    \node[draw,minimum width=2cm, minimum height=0.7cm] (x1) at (0,0) {\scalebox{1.25}{\(\bx_1^\top\)}};
    \node[draw,minimum width=2cm, minimum height=0.7cm] (x2) at (0,-0.7) {\scalebox{1.25}{\(\bx_2^\top\)}};
    \node (xdots1) at (0,-1.3) {\(\vdots\)};
    \node[draw,RubineRed,minimum width=2cm, minimum height=0.7cm] (xi) at (0,-2.1) {\scalebox{1.25}{\(\bx_i^\top\)}};
    \node (xdots2) at (0,-2.7) {\(\vdots\)};
    \node[draw,minimum width=2cm, minimum height=0.7cm] (xn) at (0,-3.5) {\scalebox{1.25}{\(\bx_n^\top\)}};
    \node[draw,minimum width=1.5cm, minimum height=0.7cm] (y1) at (2,0) {\scalebox{1.25}{\(y_1\)}};
    \node[draw,minimum width=1.5cm, minimum height=0.7cm] (y2) at (2,-0.7) {\scalebox{1.25}{\(y_2\)}};
    \node (ydots1) at (2,-1.3) {\(\vdots\)};
    \node[draw,RubineRed,minimum width=1.5cm, minimum height=0.7cm] (yi) at (2,-2.1) {\scalebox{1.25}{\(y_i\)}};
    \node (ydots2) at (2,-2.7) {\(\vdots\)};
    \node[draw,minimum width=1.5cm, minimum height=0.7cm] (yn) at (2,-3.5) {\scalebox{1.25}{\(y_n\)}};
    
    \draw[gray] ([xshift=-0.01cm, yshift=0.01cm]x1.north west) rectangle ([xshift=0.01cm, yshift=-0.01cm]xn.south east);
    
    \draw[gray] ([xshift=-0.01cm, yshift=0.01cm]y1.north west) rectangle ([xshift=0.01cm, yshift=-0.01cm]yn.south east);
    
    \node (feat-ridge-orig) at (0, -4.3) {\scalebox{1.25}{\(\mathbf{X}_{-i}\)}};
    \node (resp-ridge-orig) at (2, -4.3) {\scalebox{1.25}{\(\mathbf{y}_{-i}\)}};
    
    \node (est1) at (2.3,-5.5) {\scalebox{1.25}{\(\hat{\bbeta}_{\lambda, -i}\)}};
    
    \draw[arrow] (feat-ridge-orig) -- (est1);
    \draw[arrow] (resp-ridge-orig) -- (est1);
    
    \draw[RubineRed,dashed] (xi.west)--(xi.east);
    \draw[RubineRed,dashed] (yi.west)--(yi.east);
    
    \node[draw,minimum width=2cm, minimum height=0.7cm] (ax1) at (4.5,0) {\scalebox{1.25}{\(\bx_1^\top\)}};
    \node[draw,minimum width=2cm, minimum height=0.7cm] (ax2) at (4.5,-0.7) {\scalebox{1.25}{\(\bx_2^\top\)}};
    \node (axdots1) at (4.5,-1.3) {\(\vdots\)};
    \node[draw,ForestGreen,minimum width=2cm, minimum height=0.7cm] (axi) at (4.5,-2.1) {\scalebox{1.25}{\(\bx_i^\top\)}};
    \node (axdots2) at (4.5,-2.7) {\(\vdots\)};
    \node[draw,minimum width=2cm, minimum height=0.7cm] (axn) at (4.5,-3.5) {\scalebox{1.25}{\(\bx_n^\top\)}};
    \node[draw,minimum width=1.5cm, minimum height=0.7cm] (ay1) at (6.5,0) {\scalebox{1.25}{\(y_1\)}};
    \node[draw,minimum width=1.5cm, minimum height=0.7cm] (ay2) at (6.5,-0.7) {\scalebox{1.25}{\(y_2\)}};
    \node (aydots1) at (6.5,-1.3) {\(\vdots\)};
    \node[draw,ForestGreen,minimum width=1.5cm, minimum height=0.7cm] (ayi) at (6.5,-2.1) {\scalebox{1}{\(\bx_i^\top \hat{\bbeta}_{\lambda, -i}\)}};
    \node (aydots2) at (6.5,-2.7) {\(\vdots\)};
    \node[draw,minimum width=1.5cm, minimum height=0.7cm] (ayn) at (6.5,-3.5) {\scalebox{1.25}{\(y_n\)}};
    
    \draw[gray] ([xshift=-0.01cm, yshift=0.01cm]ax1.north west) rectangle ([xshift=0.01cm, yshift=-0.01cm]axn.south east);
    
    \draw[gray] ([xshift=-0.01cm, yshift=0.01cm]ay1.north west) rectangle ([xshift=0.01cm, yshift=-0.01cm]ayn.south east);
    
    \node (feat-ridge-aug) at  (4.5, -4.3) {\scalebox{1.25}{\(\mathbf{X}\)}};
    \node [ForestGreen] (resp-ridge-aug) at (6.5, -4.3) {\scalebox{1.25}{\(\widetilde{\mathbf{y}}_{-i}\)}};
    
    \node [ForestGreen] (est2) at (4,-5.5) {\scalebox{1.25}{\(\widetilde{\bbeta}_{\lambda, -i}\)}};
    
    \draw[arrow] (feat-ridge-aug) -- (est2);
    \draw[arrow] (resp-ridge-aug) -- (est2);
    
    \node at (3.15,-5.5) {\scalebox{1.25}{=}};
     
    \node[draw,minimum width=2cm, minimum height=0.7cm] (kx1) at (9,0) {\scalebox{1.25}{\(\bx_1^\top\)}};
    \node[draw,minimum width=2cm, minimum height=0.7cm] (kx2) at (9,-0.7) {\scalebox{1.25}{\(\bx_2^\top\)}};
    \node (kxdots1) at (9,-1.3) {\(\vdots\)};
    \node[draw,RubineRed,minimum width=2cm, minimum height=0.7cm] (kxi) at (9,-2.1) {\scalebox{1.25}{\(\bx_i^\top\)}};
    \node (kxdots2) at (9,-2.7) {\(\vdots\)};
    \node[draw,minimum width=2cm, minimum height=0.7cm] (kxn) at (9,-3.5) {\scalebox{1.25}{\(\bx_n^\top\)}};
    \node[draw,minimum width=1.5cm, minimum height=0.7cm] (ky1) at (11,0) {\scalebox{1.25}{\(y_1\)}};
    \node[draw,minimum width=1.5cm, minimum height=0.7cm] (ky2) at (11,-0.7) {\scalebox{1.25}{\(y_2\)}};
    \node (kydots1) at (11,-1.3) {\(\vdots\)};
    \node[draw,RubineRed,minimum width=1.5cm, minimum height=0.7cm] (kyi) at (11,-2.1) {\scalebox{1.25}{\(y_i\)}};
    \node (kydots2) at (11,-2.7) {\(\vdots\)};
    \node[draw,minimum width=1.5cm, minimum height=0.7cm] (kyn) at (11,-3.5) {\scalebox{1.25}{\(y_n\)}};
    
    \draw[gray] ([xshift=-0.01cm, yshift=0.01cm]kx1.north west) rectangle ([xshift=0.01cm, yshift=-0.01cm]kxn.south east);
    
    \draw[gray] ([xshift=-0.01cm, yshift=0.01cm]ky1.north west) rectangle ([xshift=0.01cm, yshift=-0.01cm]kyn.south east);
    
    \node (feat-gd-orig) at (9, -4.3) {\scalebox{1.25}{\(\mathbf{X}_{-i}\)}};
    \node (resp-gd-orig) at (11, -4.3) {\scalebox{1.25}{\(\mathbf{y}_{-i}\)}};
    
    \draw[RubineRed,dashed] (kxi.west)--(kxi.east);
    \draw[RubineRed,dashed] (kyi.west)--(kyi.east);
    
    \node (kest1) at (11.3,-5.5) {\scalebox{1.25}{\(\hat{\bbeta}_{k, -i}\)}};
    
    \draw[arrow] (feat-gd-orig) -- (kest1);
    \draw[arrow] (resp-gd-orig) -- (kest1);
    
    \node[draw,minimum width=2cm, minimum height=0.7cm] (kax1) at (13.5,0) {\scalebox{1.25}{\(\bx_1^\top\)}};
    \node[draw,minimum width=2cm, minimum height=0.7cm] (kax2) at (13.5,-0.7) {\scalebox{1.25}{\(\bx_2^\top\)}};
    \node (kaxdots1) at (13.5,-1.3) {\(\vdots\)};
    \node[draw,CornflowerBlue,minimum width=2cm, minimum height=0.7cm] (kaxi) at (13.5,-2.1) {\scalebox{1.25}{\(\bx_i^\top\)}};
    \node (kaxdots2) at (13.5,-2.7) {\(\vdots\)};
    \node[draw,minimum width=2cm, minimum height=0.7cm] (kaxn) at (13.5,-3.5) {\scalebox{1.25}{\(\bx_n^\top\)}};
    \node[draw,minimum width=1.5cm, minimum height=0.7cm] (kay1) at (15.5,0) {\scalebox{1.25}{\(y_1\)}};
    \node[draw,minimum width=1.5cm, minimum height=0.7cm] (kay2) at (15.5,-0.7) {\scalebox{1.25}{\(y_2\)}};
    \node (kaydots1) at (15.5,-1.3) {\(\vdots\)};
    \node[draw,CornflowerBlue,minimum width=1.5cm, minimum height=0.7cm] (kayi) at (15.5,-2.1) {\scalebox{1}{\(\bx_i^\top \hat{\bbeta}_{k, -i}\)}};
    \node (kaydots2) at (15.5,-2.7) {\(\vdots\)};
    \node[draw,minimum width=1.5cm, minimum height=0.7cm] (kayn) at (15.5,-3.5) {\scalebox{1.25}{\(y_n\)}};
    
    \draw[gray] ([xshift=-0.01cm, yshift=0.01cm]kax1.north west) rectangle ([xshift=0.01cm, yshift=-0.01cm]kaxn.south east);
    
    \draw[gray] ([xshift=-0.01cm, yshift=0.01cm]kay1.north west) rectangle ([xshift=0.01cm, yshift=-0.01cm]kayn.south east);
    
    \node (feat-gd-aug) at (13.5, -4.3) {\scalebox{1.25}{\(\mathbf{X}\)}};
    \node [CornflowerBlue] (resp-gd-aug) at (15.5, -4.3) {\scalebox{1.25}{\(\widetilde{\mathbf{y}}_{-i}\)}};
    
    \node [CornflowerBlue] (kest2) at (13,-5.5) {\scalebox{1.25}{\(\widetilde{\bbeta}_{k, -i}\)}};
    
    \draw[arrow] (feat-gd-aug) -- (kest2);
    \draw[arrow] (resp-gd-aug) -- (kest2);
    
    \node at (12.15,-5.5) {\scalebox{1.25}{\(\neq\)}};
    
    \end{tikzpicture}
    \caption{Illustration of the differences between LOO augmentations for ridge regression versus gradient descent.}
    \label{fig:loo-ridge-vs-gd}
\end{figure}