プリンキピア

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

12.3.5. Exercises12.3.5 練習問題

  1. Experiment with different learning rates and objective functions for gradient descent.
    英語のヒント
    勾配降下法について、さまざまな学習率と目的関数で実験せよ。
  2. Implement line search to minimize a convex function in the interval [a,b].
    英語のヒント
    区間[a,b]で凸関数を最小化する直線探索を実装せよ。
    1. Do you need derivatives for binary search, i.e., to decide whether to pick [a,(a+b)/2] or [(a+b)/2,b].
      英語のヒント
      二分探索、つまり[a,(a+b)/2]と[(a+b)/2,b]のどちらを選ぶかを決めるのに、導関数は必要か。
    2. How rapid is the rate of convergence for the algorithm?
      英語のヒント
      このアルゴリズムの収束の速さはどれくらいか。
    3. Implement the algorithm and apply it to minimizing log⁡(exp⁡(x)+exp⁡(−2x−3)).
      英語のヒント
      このアルゴリズムを実装し、log⁡(exp⁡(x)+exp⁡(−2x−3))の最小化に当てはめよ。
  3. Design an objective function defined on ℝ2 where gradient descent is exceedingly slow. Hint: scale different coordinates differently.
    英語のヒント
    勾配降下法がきわめて遅くなる、ℝ2上で定義された目的関数を設計せよ。ヒント:座標ごとに尺度を変えよ。
  4. Implement the lightweight version of Newton’s method using preconditioning:
    英語のヒント
    前条件づけを使った、ニュートン法の軽量版を実装せよ。
    1. Use diagonal Hessian as preconditioner.
      英語のヒント
      対角のヘッセ行列を前条件づけの行列として使え。
    2. Use the absolute values of that rather than the actual (possibly signed) values.
      英語のヒント
      実際の(符号がついているかもしれない)値ではなく、その絶対値を使え。
    3. Apply this to the problem above.
      英語のヒント
      これを上の問題に当てはめよ。
  5. Apply the algorithm above to a number of objective functions (convex or not). What happens if you rotate coordinates by 45 degrees?
    英語のヒント
    上のアルゴリズムを、(凸かどうかを問わず)いくつかの目的関数に当てはめよ。座標を45度回転させると何が起こるか。