The ChoiceDataset data structure uses keyword argument prefixes to determine the dependency of observable tensors, for example, the ChoiceDataset considers item_price as an item-specific observable tensor. For observable tensors depending on multiple dimensions (e.g., item-session-specific observable), the requirement on the prefix was strict in previous versions: itemsession_obs would work, but sessionitem_obs would not.
This patch implements a more flexible prefix system as the following:
There is no change to the observable tensor depending on a single dimension, the item-specific tensor should start with item_, the user-specific tensor should start with user_, and the session-specific tensor should start with session_.
For tensor depending on two dimensions, denoted x and y with x and y from ["item", "user", "session"], both prefixes xy_ and yx_ would work now. For example, the ChoiceDataset would consider tensors with prefix itemsession_ or sessionitem_ as (item, session)-specific variable.
For tensor depending on all three of item, user, and session, there are six permutations of "item", "user", and "session", all six prefixes (itemsessionuser_, 'sessionitemuser_`, etc) would work.
The
ChoiceDataset
data structure uses keyword argument prefixes to determine the dependency of observable tensors, for example, theChoiceDataset
considersitem_price
as an item-specific observable tensor. For observable tensors depending on multiple dimensions (e.g., item-session-specific observable), the requirement on the prefix was strict in previous versions:itemsession_obs
would work, butsessionitem_obs
would not.This patch implements a more flexible prefix system as the following:
item_
, the user-specific tensor should start withuser_
, and the session-specific tensor should start withsession_
.x
andy
withx
andy
from["item", "user", "session"]
, both prefixesxy_
andyx_
would work now. For example, theChoiceDataset
would consider tensors with prefixitemsession_
orsessionitem_
as (item, session)-specific variable.itemsessionuser_
, 'sessionitemuser_`, etc) would work.