[注意] ここの説明は後のつながりからすると $\boldsymbol{x}^T \boldsymbol{\theta} $ という式にした方が親切だ(わかりやすい)と思う。
Unvectorized Implementation (octave) |
prediction = 0.0; for j = 1:n+1, prediction = precdiction + theta (j) * x(j) end; |
Vectorized Implementation (octave) |
prediction = theta' * x; |
Vectorized Implementation (octave) |
授業で配布するプリントを参照して下さい。 |