A-PGNN icon indicating copy to clipboard operation
A-PGNN copied to clipboard

Have prediction tables

Open fily1212 opened this issue 4 years ago • 1 comments

Hello, I'm trying to integrate this algorithm in a evaluation framework of session-aware RS. I need to create a method that, given a user and a session with previous items (in test_set), this method return the probability table of each "next" item. Example: user 1, item: 1, 2, 4. return: items - probability 0 - 0.02 1 - 0.05 2- 0.05 3 - 0.001 4 - 0.2 5 - 0.3 .... (for each item) Or at least the list of the most probable items.

is there a way to generate this from your code, and where? I think maybe I have to feed the method model.forward, but I can't understand in which way. Can you confirm me if I'm looking at the right method? thank you so much. Best, Filippo

fily1212 avatar Aug 17 '20 09:08 fily1212

Hello, I'm trying to integrate this algorithm in a evaluation framework of session-aware RS. I need to create a method that, given a user and a session with previous items (in test_set), this method return the probability table of each "next" item. Example: user 1, item: 1, 2, 4. return: items - probability 0 - 0.02 1 - 0.05 2- 0.05 3 - 0.001 4 - 0.2 5 - 0.3 .... (for each item) Or at least the list of the most probable items.

is there a way to generate this from your code, and where? I think maybe I have to feed the method model.forward, but I can't understand in which way. Can you confirm me if I'm looking at the right method? thank you so much. Best, Filippo

Thanks for your attention. The 155th line of model_last.py, "logits = tf.matmul(y1, b, transpose_b=True)", might meet your needs.

ZM7 avatar Aug 18 '20 02:08 ZM7