You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rating = x[0]
u = x[1]
test_items = list(all_items - set(user_pos_train[u]))
item_score=[]
for i in test_items:
item_score.append((i,rating[i]))
item_score = sorted(item_score,key=lambda x:x[1])
item_score.reverse()
item_sort = [x[0] for x in item_score]`
关于上面这段代码里的x是一个什么样的形式 item_score.append((i,rating[i])) item_sort = [x[0] for x in item_score]`` 从上面这两句里面看,x应该是{(i,rating[i])}的形式,i是不是items,后面的是评分,而一开始定义的 rating = x[0] ,u = x[1]`,所以这里不是太懂,x是什么 样的形式,x[0],x[1]又是代表什么,不知道能不能给解释下,谢谢
The text was updated successfully, but these errors were encountered:
`def simple_test_one_user(x):
关于上面这段代码里的x是一个什么样的形式
item_score.append((i,rating[i])) item_sort = [x[0] for x in item_score]`` 从上面这两句里面看,x应该是{(i,rating[i])}的形式,i是不是items,后面的是评分,而一开始定义的
rating = x[0] ,u = x[1]`,所以这里不是太懂,x是什么 样的形式,x[0],x[1]又是代表什么,不知道能不能给解释下,谢谢The text was updated successfully, but these errors were encountered: