khuangaf/PyTorch-Geometric-YooChoose

Why re-encode items in different sessions in YooChooseClick.ipynb?

JinYang88 opened this issue · 0 comments

for session_id, group in tqdm(grouped):
    sess_item_id = LabelEncoder().fit_transform(group.item_id)

In the notebook YooChooseClick.ipynb, items are re-encoded, I think which may confuse the model, for example:
In graph 1, "item-2432" is encoded as 0 and in graph 2, "item-4234" is also encoded as 0, as a result, the model does not know how to treat item encoded as 0, because 0 denotes different items while training. What is the reason for doing so?