Collab: get predictions for a non-existent user

I’ve trained a model. I can make predictions for users who were there when I trained the model.

I want to be able to make predictions for a new user the model doesn’t know about. Having looked around to find out how I’m reading that I can’t make predictions for a user my model hasn’t seen, which is completely pointless since that’s exactly what I want the model for in the first place.

What I expected is that I would add a new/dummy user to the data, and add the product ratings as I got them; ie: ask them some questions to cold-start and then feed more in as I get them (when they watch things or buy things).

I can add my dummy user and add some ratings but the predictions I get back are all over the place, even for the products the new user has rated. This seems to confirm what I’m reading that the user must pre-exist and have a weights vector already.

I must be able to fudge this somehow and I don’t care how pretty it looks.

how does this work in the real world?

the best solution i’ve managed so far is to use the original ratings matrix, calculate distances between user rows and then pose as the most similar known user to run get_preds().

it works but it’s kinda stinky and it feels like something which should be happening auto-magically.

The vanilla matrix factorization cannot give predictions to users/items it hasn’t seen.
You can try other more complex models that use other user/item metadata such as factorization machines. Then you can give predictions according to age, gender without the userid
I wrote a blog about this some time ago here. (hope its ok to link to this here as it doesnt use fastai code :slight_smile: )

1 Like

absolutely, life around here is about making the world a better place, not taking over from all the other libraries.

i’ll give that a read for another time, but for this dataset i think simpler is better than more complex. i have 73,400 users X 100 items at about 50% density so finding a similar enough user isn’t a problem and calculating the distances only takes about 0.25 seconds.