avatarJonathan Hui

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2152

Abstract

re3.pdf">Source</a></figcaption></figure><h1 id="a626">Newton’s method</h1><figure id="854a"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*lHrG-LPICoS5q6u_SVx8Ww.png"><figcaption><a href="https://www.mathworks.com/matlabcentral/fileexchange/52362-newton-s-method">Source</a></figcaption></figure><p id="6f73">To solve <i>f(x)=0, </i>we can continue the follow iteration until it converges.</p><figure id="3eb8"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*fXEYRo51PVU9BhlBg-Gipw.png"><figcaption></figcaption></figure><p id="3d90">It can be used to minimize <i>f(x)</i>:</p><figure id="12f4"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*EBfkfv8o_Q1HXboPNkIeDA.png"><figcaption><a href="http://fourier.eng.hmc.edu/e176/lectures/NM/node25.html">Source</a></figcaption></figure><p id="f48d">The iteration used will be:</p><figure id="d192"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*quWLV8Jhk29Uso_VGTHnEg.jpeg"><figcaption></figcaption></figure><h1 id="f5f1">Nonlinear least-squares problem with Gauss-Newton method</h1><p id="9c95">(<a href="https://www8.cs.umu.se/kurser/5DA001/HT07/lectures/lsq-handouts.pdf">Example credit for the Gauss-Newton method</a>)</p><p id="6d5b">Suppose we have a function <i>g(t)</i> model by parameters x1 and x2.</p><figure id="88dd"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*KLRkI5CzN49AY58jVHM3vw.jpeg"><figcaption></figcaption></figure><p id="e361">And we have training samples for <i>t</i> with output label <i>y</i>.</p><figure id="c3e9"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*pgPkNympJmBBVe84Oqrnrw.jpeg"><figcaption></figcaption></figure><p id="0821">We can define a function r which measures the error between our model and the label:</p><figure id="67ce"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*IsmkGb-7ylMl4DV1jXiryg.jpeg"><figcaption></figcaption></figure><p id="4e1a">Now, our objective is to fit our model g with samples to minimize the following objective:</p><figure id="acbe"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*y

Options

gyzKPVn4pJ-HFpAA61VRg.png"><figcaption></figcaption></figure><p id="371b">In this section, we will apply the Nonlinear least-squares problem with Gauss-Newton method.</p><p id="4c57">With Newton’s method on optimization:</p><figure id="f0f3"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*bFFLHOlRrIdcoa8XytduqA.jpeg"><figcaption></figcaption></figure><p id="1c14">According to the equation above, we can rewrite the <i>Δx </i>as the searching direction <i>p</i>. The equations becomes:</p><figure id="0add"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*K4wCvkQr8tUxUz5PiW5Ukw.png"><figcaption></figcaption></figure><p id="120d">Compute the first and second order derivative of <b><i>f</i></b>:</p><figure id="7331"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*S7TlpRU1fxqP66f4ZuNZjA.jpeg"><figcaption></figcaption></figure><p id="7fe9">In the Gauss-Newton method, we approximate the second derivative above without the <b><i>Q </i></b>term. The <b><i>Q</i></b> term is smaller than the first term and if the problem has zero residual, <i>r = Q = 0</i>.</p><p id="fdeb">Gauss-Newton method applies this approximation to the Newton method.</p><figure id="4f81"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*9iZe4P3zbrRa4rqk2slYmw.jpeg"><figcaption></figcaption></figure><p id="12fe">The Gauss-Newton method search direction is:</p><figure id="14ce"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*n531VdNCW3tebSCyWChpjg.png"><figcaption></figcaption></figure><p id="091e">Let’s have an example, we want to determine the growth rate of antelope. We develop a model <b><i>g</i></b> and fit data into the model to compute the residual error <b><i>r</i></b>:</p><figure id="2217"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*9IEHyRhfyW37LasjGdom9A.jpeg"><figcaption></figcaption></figure><figure id="48f7"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*JmHkQ2owbCLaueD7eG8wJA.png"><figcaption><a href="https://www8.cs.umu.se/kurser/5DA001/HT07/lectures/lsq-handouts.pdf">Source</a></figcaption></figure></article></body>

RL — Optimization Algorithms

This article contains the optimization algorithms often mentioned in RL.

Trust region method

There are two major optimization methods: line search and trust region. Gradient descent is a line search. We determine the descending direction first and we take a step in that direction. In gradient descent, the step size is the gradient × learning rate.

Modified from Source

In the trust region, we determine the maximum step size that we want to explore and then we locate the optimal point within this trust region. Let’s start with an initial maximum step size δ as the radius of the trust region (the yellow circle). Our objective is to find the optimal point for m within the radius δ.

The trust region can be expanded or shrink in runtime to adjust to the curvature of the surface and there are many possibilities. In the traditional trust region method, since we approximate the objective function f with m, one possibility is to shrink the trust region if m is a poor approximator of f at the optimal point. On the contrary, if the approximation is good, we expand it. The following is the trust region method which dynamically adjusts the trust region size according to the criteria just mentioned.

Source

Newton’s method

Source

To solve f(x)=0, we can continue the follow iteration until it converges.

It can be used to minimize f(x):

Source

The iteration used will be:

Nonlinear least-squares problem with Gauss-Newton method

(Example credit for the Gauss-Newton method)

Suppose we have a function g(t) model by parameters x1 and x2.

And we have training samples for t with output label y.

We can define a function r which measures the error between our model and the label:

Now, our objective is to fit our model g with samples to minimize the following objective:

In this section, we will apply the Nonlinear least-squares problem with Gauss-Newton method.

With Newton’s method on optimization:

According to the equation above, we can rewrite the Δx as the searching direction p. The equations becomes:

Compute the first and second order derivative of f:

In the Gauss-Newton method, we approximate the second derivative above without the Q term. The Q term is smaller than the first term and if the problem has zero residual, r = Q = 0.

Gauss-Newton method applies this approximation to the Newton method.

The Gauss-Newton method search direction is:

Let’s have an example, we want to determine the growth rate of antelope. We develop a model g and fit data into the model to compute the residual error r:

Source
Machine Learning
Recommended from ReadMedium