プリンキピア

第21章推薦システム

21.4.1. Model21.4.1 モデル

Let 𝐑∗i denote the ith column of the rating matrix, where unknown ratings are set to zeros by default. The neural architecture is defined as:
英語のヒント
𝐑∗iを評価行列のithの列とする。ここで未知の評価は既定で0とする。ニューラルネットワークの構造は次のように定義される。
h(𝐑∗i)=f(𝐖⋅g(𝐕𝐑∗i+μ)+b)(21.4.1)
where f(⋅) and g(⋅) represent activation functions, 𝐖 and 𝐕 are weight matrices, μ and b are biases. Let h(⋅) denote the whole network of AutoRec. The output h(𝐑∗i) is the reconstruction of the ith column of the rating matrix.
英語のヒント
ここでf(⋅)とg(⋅)は活性化関数を表し、𝐖と𝐕は重み行列、μとbはバイアスである。h(⋅)をAutoRecのネットワーク全体とする。出力h(𝐑∗i)は、評価行列のithの列の再構成である。
The following objective function aims to minimize the reconstruction error:
英語のヒント
次の目的関数は、再構成誤差を最小化することを目指す。
argmin𝐖,𝐕,μ,b∑i=1M∥𝐑∗i−h(𝐑∗i)∥𝒪2+λ(∥𝐖∥F2+∥𝐕∥F2)(21.4.2)
where ∥⋅∥𝒪 means only the contribution of observed ratings are considered, that is, only weights that are associated with observed inputs are updated during back-propagation.
英語のヒント
ここで∥⋅∥𝒪は、観測された評価の寄与だけを考えることを意味する。つまり、誤差逆伝播のあいだ、観測された入力に結びついた重みだけが更新される。
import mxnet as mx
from mxnet import autograd, gluon, np, npx
from mxnet.gluon import nn
from d2l import mxnet as d2l

npx.set_np()