Skip to content

[ASK] Questions about the construction of user history #1258

@DoubleX-Star

Description

@DoubleX-Star

Hi, I'm a little confuseds about how to load MIND data.

Description

When initializing user behavior, the code in MINDIterator/MINDAllIterator is like this :

history = [0] * (self.his_size - len(history)) + history[ : self.his_size ]

Padding 0 to the head of the list when the history is insufficient should mean that the News in history are arranged according to time. (The later the position, the newer the time) On the other hand, the first his_size elements are selected in the code.

Solution

Would it be more reasonable to select the latest his_size elements like this to represent the user status?

history = [0] * (self.his_size - len(history)) + history[ -self.his_size : ]

Other Comments

Specific location link :
https://github.com/microsoft/recommenders/blob/66e4b6b2220bae6bb97947e1bbe7c5d97cbec979/reco_utils/recommender/newsrec/io/mind_iterator.py#L117

https://github.com/microsoft/recommenders/blob/66e4b6b2220bae6bb97947e1bbe7c5d97cbec979/reco_utils/recommender/newsrec/io/mind_all_iterator.py#L143

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions