For simplicity let's consider a brand-new user first, not a new rating
for existing user. I'll use the notation from my slides that you
mention, A = X * Y'. To clarify, I think you mean you have a new A_u
row, and want to know X_u.

The two expressions are not alternatives, they're the same thing,
though abusing notation a little. In the first that's not a real
inverse since Y' is not even square. It needs to be something that
works as a right-inverse. The second elaborates what that is -- that
is an inverse, of a square matrix.

As you might have seen on this list I actually investigated this part
a lot last week since I thought there was a numerical problem. There
is a gotcha here, but it's not to do with inverses. Yes you can use a
QR decomposition to find the inverse. It's fast. There is a QR
decomposition in the project, or, I've had good luck with Commons
Math. (In fact 3.2 has a proper rank-revealing QR decomposition now,
which is useful for other reasons in this context.)

I ended up not actually computing the inverse, and instead using a QR
decomposition to solve A_u = X_u * Y' for X_u. It's nearly exactly the
same thing, but more principled.

Back to handling a new event for an existing user -- it gets trickier
here since you don't want to fold-in A_u = [ .. 0 0 1 0 0 .. ] -- it's
too big, especially if A_u already has a value near 1 in that spot.
Note that you also want to consider updating Y similarly; you've
learned about the user but you also learned about the item. Same
thing, just for the other matrix.

Sean

On Wed, Apr 10, 2013 at 9:29 PM, Chloe <chloe.gu...@gmail.com> wrote:
> Hi everyone,
>
> I am reaching out to the list requesting some help/advice on implementing
> fold-in with the Alternating Least Squares algo in Mahout, a problem on
> which I am stumped. I've read other posts on the list and over on SO, like:
>
> http://stackoverflow.com/questions/12444231/svd-matrix-conditioning-
> how-to-project-from-original-space-to-conditioned-spac
> and
> http://stackoverflow.com/questions/12857693/mahout-how-to-make-
> recommendations-for-new-users
> including the slide show talk posted in the last link. This slide show seems
> to be the most relevant to my purposes, specifically slide 14, but I can't 
> fully
> understand it.
>
> At the end of ALS I have Ratings = A = UM', where U is user feature matrix
> and M is item feature matrix.
> For an existing user with a new rating, I plan to update the Auser only,which
> is (1 x number of items) by replacing/adding new rating at the appropriate
> index and then do:
> Uuser = Auser * V'   ( 1 x items)(items x features)
> Sub Uuser back into U and get new recommendations
>
> How do I address a NEW user? From the slide:
> X = A (Y')^-1
> or
> X = A Y ((Y'Y) ^-1)
>
> Is the 2nd preferable? If so, why? I would appreciate a more 'wordy'
> explanation or someone pointing me to any papers I can read on this. Also,
> as a slight offshoot, given that mahout doesn't have matrix inversion, is it
> more advisable to use QR decomp to find a pseudoinverse or an outside
> package to do inversion?
>
> Apologies for the long post which I did try and make concise, and thank
> you for any help you offer.
>
> Chloe
>
>

Reply via email to