Torch-Choice: A PyTorch Package for Large-Scale Choice Modelling with Python
Tianyu Du,
Ayush Kanodia and
Susan Athey
Additional contact information
Tianyu Du: Stanford U
Ayush Kanodia: Stanford U
Research Papers from Stanford University, Graduate School of Business
Abstract:
The torch-choice is an open-source library for flexible, fast choice modeling with Python and PyTorch. torch-choice provides a ChoiceDataset data structure to manage databases flexibly and memory-efficiently. The paper demonstrates constructing a ChoiceDataset from databases of various formats and functionalities of ChoiceDataset. The package implements two widely used models, namely the multinomial logit and nested logit models, and supports regularization during model estimation. The package incorporates the option to take advantage of GPUs for estimation, allowing it to scale to massive datasets while being computationally efficient. Models can be initialized using either R-style formula strings or Python dictionaries. We conclude with a comparison of the computational efficiencies of torch-choice and mlogit in R as (1) the number of observations increases, (2) the number of covariates increases, and (3) the expansion of item sets. Finally, we demonstrate the scalability of torch-choice on large-scale datasets.
Date: 2023-04
New Economics Papers: this item is included in nep-cmp and nep-dcm
References: View references in EconPapers View complete reference list from CitEc
Citations: View citations in EconPapers (1)
Downloads: (external link)
https://arxiv.org/abs/2304.01906
Related works:
Working Paper: Torch-Choice: A PyTorch Package for Large-Scale Choice Modelling with Python (2023) 
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:ecl:stabus:4106
Access Statistics for this paper
More papers in Research Papers from Stanford University, Graduate School of Business Contact information at EDIRC.
Bibliographic data for series maintained by (workingpapers@econlit.org).