[Question] How I can access user-items predictions and actuals?
See original GitHub issueIām trying to understand how to get all users from my test dataset with the corresponding predicted items per each user? I use RecVAE model and when I get top items like that:
def run_predict(model, test_data, device, k):
item_tensor = test_data.dataset.get_item_feature().to(device).repeat(test_data.step)
tot_item_num = test_data.dataset.item_num
topk_list = []
for batched_data in test_data:
interaction, history_index, *_ = batched_data
try:
scores = model.full_sort_predict(interaction.to(device))
except NotImplementedError:
new_inter = interaction.to(
device).repeat_interleave(tot_item_num)
batch_size = len(new_inter)
new_inter.update(item_tensor[:batch_size])
scores = model.predict(new_inter)
scores = scores.view(-1, tot_item_num)
scores[:, 0] = -np.inf
if history_index is not None:
scores[history_index] = -np.inf
topk_list.append(torch.topk(scores, k=k)[1])
topk_items = torch.cat(topk_list, dim=0).unique()
topk_items = topk_items.cpu().numpy()
return topk_items
it returns just items which doesnāt correspond to number of users I have in test_data.dataset.user_num
So Iām a little lost, how would I see user per each of these topk_items
predictions? And how to access initial items for each user from test data?
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
How to Connect Model Input Data With Predictions for ...
In this case, we will use a simple two-class or binary classification problem with two numerical input variables.
Read more >Use predicted or actual values for 'unknown' independent ...
When performing linear regression for the sake of prediction, I am left with the conundrum of whether I should use the actual values...
Read more >A Comprehensive Guide on How to Monitor Your Models in ...
Use unsupervised learning methods to categorize model inputs and predictions, allowing you to discover cohorts of anomalous examples andĀ ...
Read more >Manage Google autocomplete predictions - Google Search Help
With autocomplete, you can enter a Google search more quickly. You can turn off or remove certain autocomplete predictions or report issues with...
Read more >Making Predictions with Regression Analysis - Statistics By Jim
In this post, I show how to use regression analysis to make predictions and determine whether they are both unbiased and precise. You...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
thank you for this example!! now i get itš
Iām looking not for a cold start problem solution, but more about recommendations for new users with provided interaction records. so if iām using RecVAE model, is there any already-built possibility to update dataset with such new records and continue training model and making predictions on such updated dataset?
@AsyaEvloeva Sorry, we donāt have such an interface at present.