gsbDBI / torch-choice

Choice modeling with PyTorch: logit model and nested logit model
MIT License
39 stars 8 forks source link

Change osbervable names `itemsession_<obs_name>` to `sessionitem_<obs_name>`. #31

Closed TianyuDu closed 1 year ago

TianyuDu commented 1 year ago

The ChoiceDataset is expecting a tensor of shape (S, I, *) for observables depending on both item and session. The shape of tensors is session-item-*, but right now such a variable is called itemsession_obs. We need to change this to sessionitem_obs to make it more intuitive.

TianyuDu commented 1 year ago

Ideally, we support both itemsession_obs and sessionitem_obs for backward compatibility.

TianyuDu commented 1 year ago

Ideally, both itemsession_obs and sessionitem_obs should work. Similarly, both useritem_obs and itemuser_obs should work.

  1. Both itemsession_obs and sessionitem_obs work exactly the same.
  2. Both useritem_obs and itemuser_obs should work exactly the same.
  3. All strings starting with any of the 6 permutations of user, item, and session should be parsed exactly the same.