プリンキピア

第3章回帰のための線形ニューラルネットワーク

3.5.6. Exercises3.5.6 練習問題

  1. How would you need to change the learning rate if you replace the aggregate loss over the minibatch with an average over the loss on the minibatch?
    英語のヒント
    ミニバッチ上の損失の総和を、ミニバッチ上の損失の平均に置き換えたら、学習率をどう変える必要があるか。
  2. Review the framework documentation to see which loss functions are provided. In particular, replace the squared loss with Huber’s robust loss function. That is, use the loss function
    英語のヒント
    フレームワークの文書を見て、どんな損失関数が提供されているかを調べよ。特に、二乗損失をフーバーのロバスト損失関数に置き換えよ。つまり、次の損失関数を使え。
    l(y,y′)={|y−y′|−σ2 if |y−y′|>σ12σ(y−y′)2 otherwise(3.5.1)
  3. How do you access the gradient of the weights of the model?
    英語のヒント
    モデルの重みの勾配にはどうアクセスするか。
  4. What is the effect on the solution if you change the learning rate and the number of epochs? Does it keep on improving?
    英語のヒント
    学習率とエポックの数を変えると、解にどんな影響があるか。改善し続けるか。
  5. How does the solution change as you vary the amount of data generated?
    英語のヒント
    生成するデータの量を変えると、解はどう変わるか。
    1. Plot the estimation error for 𝐰ˆ−𝐰 and bˆ−b as a function of the amount of data. Hint: increase the amount of data logarithmically rather than linearly, i.e., 5, 10, 20, 50, …, 10,000 rather than 1000, 2000, …, 10,000.
      英語のヒント
      𝐰ˆ−𝐰とbˆ−bの推定誤差を、データの量の関数として描け。ヒント:データの量を線形にではなく対数的に増やせ。つまり、1000、2000、…、10,000ではなく、5、10、20、50、…、10,000とする。
    2. Why is the suggestion in the hint appropriate?
      英語のヒント
      ヒントの提案が適切なのはなぜか。