jfkirk / tensorrec

A TensorFlow recommendation algorithm and framework in Python.
Apache License 2.0
1.28k stars 222 forks source link

I'm getting this error in my code output #132

Open maickhenriquesantos opened 5 years ago

maickhenriquesantos commented 5 years ago

Traceback (most recent call last): File "C:/Users/Maick Henrique/PycharmProjects/recsys-experiments/codes/testeTensor.py", line 118, in test_recom() File "C:/Users/Maick Henrique/PycharmProjects/recsys-experiments/codes/testeTensor.py", line 102, in test_recom recall_k=10, precision_k=10, ndcg_k=10) File "C:\Users\Maick Henrique\AppData\Roaming\Python\Python36\site-packages\tensorrec\eval.py", line 158, in fit_and_eval p_at_k = precision_at_k(predicted_ranks, test_interactions, k=precision_k) File "C:\Users\Maick Henrique\AppData\Roaming\Python\Python36\site-packages\tensorrec\eval.py", line 22, in precision_at_k ranks = sp.csr_matrix(predicted_ranks * positive_test_interactions.A) ValueError: operands could not be broadcast together with shapes (84658,2460) (17454,3)

jfkirk commented 5 years ago

Hey @maickhenriquesantos -- to help debug this, can you give me the following information: Shape of the interactions [rows, cols, #values] Shape of the user features [rows, cols, #values] Shape of the item features [rows, cols, #values]