Open timothyb0912 opened 4 years ago
Hi @timothyb0912, how is the progress of this feature going?
I am currently using pylogit for the mnl estimation of a large data set (million rows) with a large number of alternatives. I have some experience with pytorch, and would like to integrate pytorch's mini-batch optimization into pylogit.
Should we develop another estimation.py file in pylogit? Do you have a plan for this feature or any advice where I should start?
Really appreciate your help!
Thank you.
Request
Currently, PyLogit is built atop
numpy
andscipy.sparse
for computational of choice probabilities, gradients, and hessians. This computational backend has at least two problems.Note, packages such as autograd and jax are of no help here because they don't support sparse matrices.
PyLogit should move to using PyTorch as its computational backend. There are almost no immediately known downsides. Upsides include resolving both problems above, allowing essentially arbitrary chocie models to be estimated through PyLogit, and providing access to a large and growing ecosystem of tools that are all designed around PyTorch (e.g. for model serialization, for scikit-learn compatibility, for standardization of model estimation code by end users, etc.).