[微積]求兩題gradient分析?

看板Math作者 (alex)時間8年前 (2017/09/15 08:04), 8年前編輯推噓0(006)
留言6則, 1人參與, 最新討論串1/1
(1)Run gradient descent, staring at (-0.8,-0.8) with "alpha"=0.2 and 139 iterations, for the surface z=f(x,y)=exp(x*y) / (exp(x^2*y^2) +1), -3<=x<=3, -3<=y<=3 Q1:Explain why the algorithm stalls and does not descend further? (2)Run gradient "ascent", staring at (-0.6,-2.3) with "alpha"=0.1 and 529 iterations, for the surface z=f(x,y)=(y^2*x^(2/3))/x^2+y^2+1, -3<=x<=3, -3<=y<=3 Q2:Explain why the algorithm zig-zags around the optima? 只會用matlab跑出圖形,但不知道怎explain有無高手可幫忙!感恩! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 151.181.36.98 ※ 文章網址: https://www.ptt.cc/bbs/Math/M.1505433884.A.D1E.html

09/15 12:58, , 1F
(1) 因為已經走到local minumum, 所以不動了
09/15 12:58, 1F

09/15 12:59, , 2F
至於 (2) 是不是有打錯?
09/15 12:59, 2F
sorry,(2)因該是ascent,f(x,y)=(y平方*x平方開三次方根)/(x平方+y平方+1) 再麻煩幫我解答 ※ 編輯: jolin19 (151.181.36.98), 09/15/2017 23:05:44

09/17 13:35, , 3F
hmm..不過應該是descent才會有"zig-zags"的情況
09/17 13:35, 3F

09/17 13:39, , 4F
你觀察 ∂f/∂x 的圖形,靠近 x=0 時的值會變大
09/17 13:39, 4F

09/17 13:40, , 5F
這個時候走的步數較大時會跨過 x=0
09/17 13:40, 5F

09/17 13:41, , 6F
所以就會在 x=0 兩邊跳來跳去
09/17 13:41, 6F
文章代碼(AID): #1PknaSqU (Math)