CCIIPLab / GCE-GNN

The source code for "Global Context Enhanced Graph Neural Network for Session-based Recommendation".
124 stars 30 forks source link

Why reverse the sequence? #5

Closed caiyongqi closed 3 years ago

caiyongqi commented 3 years ago

reverse the sequence

us_pois = [list(reversed(upois)) + [0] * (max_len - le) if le < max_len else list(reversed(upois[-max_len:])) for upois, le in zip(inputData, len_data)]

Why reverse the sequence? Thank you.

Mikrokosmos1997 commented 3 years ago

Thank you for your interest. In this work, we incorporate position information into the model by using reversed position vectors, where the first position vector corresponds to the last item. Comparing with reversing position vectors, we found that it is more convenient to reverse the original sequence.

caiyongqi commented 3 years ago

Thank you for your interest. In this work, we incorporate position information into the model by using reversed position vectors, where the first position vector corresponds to the last item. Comparing with reversing position vectors, we found that it is more convenient to reverse the original sequence.

Thanks for your answer.