プリンキピア

第12章最適化アルゴリズム

12.4.6. Exercises12.4.6 練習問題

  1. Experiment with different learning rate schedules for stochastic gradient descent and with different numbers of iterations. In particular, plot the distance from the optimal solution (0,0) as a function of the number of iterations.
    英語のヒント
    確率的勾配降下法について、さまざまな学習率のスケジュールと、さまざまな反復回数で実験せよ。特に、最適解(0,0)からの距離を反復回数の関数としてプロットせよ。
  2. Prove that for the function f(x1,x2)=x12+2x22 adding normal noise to the gradient is equivalent to minimizing a loss function f(𝐱,𝐰)=(x1−w1)2+2(x2−w2)2 where 𝐱 is drawn from a normal distribution.
    英語のヒント
    関数f(x1,x2)=x12+2x22について、勾配に正規分布のノイズを加えることは、𝐱が正規分布から引かれる損失関数f(𝐱,𝐰)=(x1−w1)2+2(x2−w2)2を最小化することと同値であることを証明せよ。
  3. Compare convergence of stochastic gradient descent when you sample from {(x1,y1),…,(xn,yn)} with replacement and when you sample without replacement.
    英語のヒント
    {(x1,y1),…,(xn,yn)}から復元抽出したときと非復元抽出したときとで、確率的勾配降下法の収束を比べよ。
  4. How would you change the stochastic gradient descent solver if some gradient (or rather some coordinate associated with it) was consistently larger than all the other gradients?
    英語のヒント
    ある勾配(というより、それに対応するある座標)がほかのすべての勾配より一貫して大きかったら、確率的勾配降下法のソルバーをどう変えるか。
  5. Assume that f(x)=x2(1+sin⁡x). How many local minima does f have? Can you change f in such a way that to minimize it one needs to evaluate all the local minima?
    英語のヒント
    f(x)=x2(1+sin⁡x)とする。fには局所的な最小値がいくつあるか。最小化するためにすべての局所的な最小値を評価しなければならないように、fを変えられるか。