Alterna · learning material

05.2. A small step against an increase in error

The Gradient is headed for local growth, and we're going to take a little step back and check the results.

What this material covers

Content and key concepts

On the previous page: error as a surface.
The Gradient is headed for local growth, and we're going to take a little step back and check the results.
Function x2+3y2 at point [2.1].
Для изменения рисунка включитеJavaScript; расчёт и теория доступны далее.
Local rationale and exact boundary
In the first order of taylor at a small : L(
θ
k
+
1
=
θ
k
−
η
∇
L
(
θ
k
)
.
\theta_{k+1}=\theta_k-\eta\nabla L(\theta_k).
θ
k
+
1
​
=
θ
k
​
−
η
∇
L
(
θ
k
​
)
.
On the diagonal quadrant, each coordinate is updated separately: x_new=(1 - 2a)x,y_new =(1−2b)y. For the two directions of the arbitrary start, the reference point is
===2,1===1 is received by g=[4.6], * new=[1.6,.4], L_new=3.04.
Research.
First, predict the behavior of three x=1.1/3,.5, then move the italics. All the co-ordinates of one step use one old g. You cannot update x, count the gradient and then update y, and continue to call the same GD procedure.
The small norma (g) stop, the number of iterations or the increase in the values is the solution of the algorithm. The lab safety limit1e6 for absolute coordinates stops further calculation with the signature of the limit, and does not declare the same.
x,y,eta = 2,1,.1
gx,gy = 2*x,6*y
nx,ny = x-eta*gx,y-eta*gy
assert abs(nx*nx+3*ny*ny-3.04)<1e-12
The code repeats the operations just taken care of.
Completely checked Python-example Chapter
Available with a separate file; the short piece shown does not replace its implementation.
The settings have changed; the data and the rule of error evaluation remain the same. The success of the step needs to be rechecked.
What examples were involved in the correction. How does this matter continue?
Python examples of Chapter 05
Academic base

Textbook contents map