看板 Math 關於我們 聯絡資訊
(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
as7218 : (1) 因為已經走到local minumum, 所以不動了 09/15 12:58
as7218 : 至於 (2) 是不是有打錯? 09/15 12:59
sorry,(2)因該是ascent,f(x,y)=(y平方*x平方開三次方根)/(x平方+y平方+1) 再麻煩幫我解答 ※ 編輯: jolin19 (151.181.36.98), 09/15/2017 23:05:44
as7218 : hmm..不過應該是descent才會有"zig-zags"的情況 09/17 13:35
as7218 : 你觀察 ∂f/∂x 的圖形,靠近 x=0 時的值會變大 09/17 13:39
as7218 : 這個時候走的步數較大時會跨過 x=0 09/17 13:40
as7218 : 所以就會在 x=0 兩邊跳來跳去 09/17 13:41