gsbDBI / torch-choice

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

Enables users to control for the initialization strategies of different coefficients. #33

Closed TianyuDu closed 1 year ago

TianyuDu commented 1 year ago

The model convergence can be sensitive to the initial weights of coefficients. We added a weight_initialization keyword argument to the ConditionalLogitModel class and {nest, item}_weight_initialization keyword arguments to the NestedLogitModel class. These arguments allow users to control the initialization of coefficients (e.g., initialize to zeros, uniform random, or Gaussian random). Please see the notebook here: ./tutorial/coefficient_initialization.ipynb for demonstrations.