Skip to content

DIN VarLenSparseFeat input and Historics Sequence of VarLenSparseFeat  #302

@jlandonedwards

Description

@jlandonedwards

I'm wondering how to setup the feature columns for DIN where the individual behaviour is VarLen and the historic sequence will be VarLen of VarLen.

In you current DIN example you have an individual behaviour is associated with a single category id:

cate_id = np.array([1, 2, 2]) # 0 is mask value
hist_cate_id = np.array([[1, 2, 2, 0], [2, 2, 1, 0], [1, 2, 0, 0]])
Suppose instead there are multiple categories for an indivual behaviour like in the moviesLens data:
cate_id = np.array([[1, 2, 3, 0], [3, 2, 1, 0], [1, 2, 0, 0]]) # 0 is mask value
hist_cate_id = np.array([[[1, 2, 2, 0], [2, 2, 1, 0], [1, 2, 0, 0]], [[1, 2, 2, 0], [2, 2, 1, 0], [1, 2, 0, 0]],[[1, 2, 2, 0], [2, 2, 1, 0], [1, 0, 0, 0]]])

How should I setup the feature columns to handle this?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions