gsbDBI / torch-choice

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

Fix bug that multi-level fixed effect cannot be correctly parsed #20

Closed TianyuDu closed 1 year ago

TianyuDu commented 1 year ago

Current the model doesn't seem to support (1|user) and (1|item) at the same time, even if both of these are included in the formula, only one of them (the later one) will be used. This is because there is only one internal variable intercept in the model, and the current formula parser tries to attach both user-level variation and item-level variation to the same variable intercept can cause conflict.

Additionally, currently, the model only allows for one level of variation for each observable (e.g., you cannot have both user-specific coefficient and the item-specific coefficient for the same observable). We are actively working on methods to fix this issue.

TianyuDu commented 1 year ago

I have implemented/fixed this issue; it will be in release v1.0.1.