Skip to content
Richard Townsend edited this page Aug 30, 2014 · 1 revision

<math>x=\left[\begin{array}{cc} 1]</math>

<math>y=\left[\begin{array}{c} 8\\ 26 \end{array}\right]</math>

<math>\theta=\left[\begin{array}{c} 0\\ 0 \end{array}\right]</math>

Epoch 1

BatchGradientDescent

<math>t=x\theta=\left[\begin{array}{cc} 1]\left[\begin{array}{c} 0\\ 0 \end{array}\right]=\left[\begin{array}{c} 0\\ 0 \end{array}\right] </math>

<math>e=t-y=\left[\begin{array}{c} 0\\ 0 \end{array}\right]-\left[\begin{array}{c} 8\\ 26 \end{array}\right]=\left[\begin{array}{c} -8\\ -26 \end{array}\right]</math>

<math>g=\frac{e\alpha}{m}=\left[\begin{array}{c} -4\\ -13 \end{array}\right]\times0.005</math>

<math>\theta=\theta-g=\left[\begin{array}{c} 0.02\\ 0.065 \end{array}\right] </math>

Epoch 2

<math> t=\left[\begin{array}{cc} 1]\left[\begin{array}{c} 0.020\\ 0.065 \end{array}\right]=\left[\begin{array}{c} 0.215\\ 0.620 \end{array}\right] </math>

<math> e=\left[\begin{array}{c} 0.215\\ 0.620 \end{array}\right]-\left[\begin{array}{c} 8\\ 26 \end{array}\right]=\left[\begin{array}{c} -7.785\\ -25.388 \end{array}\right] </math>

<math> g=\left[\begin{array}{c} -0.0195\\ -0.0635 \end{array}\right] </math>

<math> \theta=\left[\begin{array}{c} 0.020\\ 0.065 \end{array}\right]-\left[\begin{array}{c} -0.0195\\ -0.0635 \end{array}\right] </math>

Clone this wiki locally