Item-based AutoRec is an autoencoder applied to each item's column of ratings. Y is the (M, N) user-by-item ratings matrix with unobserved entries stored as 0, and mask marks the observed entries. For item with column :
with , , and the logistic sigmoid.
autorec_forward(Y, V, mu, W, b): the (M, N) matrix whose column is .
autorec_loss(Y, mask, out, W, V, lam): , as a Python float.
autorec_grads(Y, mask, V, mu, W, b, lam): a dict with the exact gradients of that loss with respect to "V", "mu", "W" and "b" (unobserved outputs contribute nothing).
autorec_n_params(M, K): the parameter count .