tensorflow / recommenders

TensorFlow Recommenders is a library for building recommender system models using TensorFlow.
Apache License 2.0
1.83k stars 274 forks source link

Predictions: What does the "score" represent? #290

Open edwardbernays opened 3 years ago

edwardbernays commented 3 years ago

I'm using code similar to the retrieval tutorial to generate predictions.

  # Pass a user id in, get top predicted movie titles back.
  scores, titles = loaded(["42"])

My predictions look great, but I'm trying to understand the "score" metric as It can fluctuate from user to user.

Example 1) This user has a mean "Score" around 3718.

(<tf.Tensor: shape=(1, 10), dtype=float32, numpy=
 array([[3718.9985, 3718.956 , 3718.5947, 3718.4873, 3718.4324, 3718.426 ,
         3718.382 , 3718.2532, 3718.2302, 3718.1963]], dtype=float32)>,
 <tf.Tensor: shape=(1, 10), dtype=string, numpy=
 array([[b'129521', b'129518', b'129515', b'481053', b'37048', b'37041',
         b'37090', b'480307', b'37113', b'143828']], dtype=object)>)

Example 2) This user has a mean "Score" around 1270.

(<tf.Tensor: shape=(1, 10), dtype=float32, numpy=
 array([[1271.7051, 1270.4905, 1270.4592, 1270.4503, 1270.087 , 1270.038 ,
         1269.7665, 1269.7266, 1269.6135, 1269.4446]], dtype=float32)>,
 <tf.Tensor: shape=(1, 10), dtype=string, numpy=
 array([[b'749276', b'689238', b'750439', b'689127', b'747382', b'636582',
         b'689252', b'636573', b'636337', b'748710']], dtype=object)>)

My questions are: 1) Why does the score fluctuate so much between users? 2) How is the score calculated (What is it)?

maciejkula commented 3 years ago

It doesn't have any particular meaning - its role is to provide a way to sort items for a particular user from most to least attractive.