Demand Estimation and Assortment Optimization Under Substitution