CPC G06Q 30/0206 (2013.01) | 14 Claims |
1. A method, performed at a computer system comprising a processor and a computer-readable medium, comprising:
receiving information describing an order placed by a user of an online system;
retrieving a set of user features associated with the user;
receiving a set of contextual features associated with servicing the order;
accessing a first machine learning model trained to predict a tip amount the user is likely to provide for servicing the order, wherein the first machine learning model is trained by:
receiving first historical data describing tip amounts provided by a plurality of users of the online system for previous orders placed by the plurality of users and first contextual data comprising a first set of contextual features describing contexts for serving the previous orders, and
training the first machine learning model based at least in part on the first historical data;
applying the first machine learning model to a first set of inputs to predict the tip amount the user is likely to provide for servicing the order, wherein the first set of inputs comprises the information describing the order placed by the user, the set of user features associated with the user, and a first subset of the received set of contextual features associated with servicing the order, wherein the first subset of the received set of contextual features correspond to the first set of contextual features;
determining a suggested tip amount for servicing the order based at least in part on the predicted tip amount the user is likely to provide for servicing the order;
accessing a second machine learning model trained to predict an average tip amount for servicing the order, wherein the second machine learning model is trained by:
receiving second historical data describing tip amounts provided by a plurality of users of the online system for previous orders placed by the plurality of users and second contextual data comprising a second set of contextual features describing contexts for serving the previous orders, wherein the second set of contextual features comprises different features from the first set of contextual features; and
training the second machine learning model based on the second historical data;
applying the second machine learning model to a second set of inputs to predict an average tip amount for servicing the order, wherein the second set of inputs comprises the information describing the order placed by the user and the set of user features associated with the user and a second subset of the received set of contextual features associated with servicing the order, wherein the second subset of the received set of contextual features correspond to the second set of contextual features;
comparing the suggested tip amount to the average tip amount; and
responsive to the suggested tip amount exceeding the average tip amount by a threshold:
identifying a contextual feature of the first subset of the received set of contextual features that is not in the second subset of the received set of contextual features, wherein identifying the contextual feature comprises applying a reason prediction model to the received set of contextual features and the set of user features, wherein the reason prediction model is a machine-learning model trained based on a plurality of training examples to predict which of the received set of contextual features caused a difference between a suggested tip amount and an average tip amount; and
transmitting a user interface for display to the user of the online system through a client device associated with the user, wherein the user interface comprises the suggested tip amount and a reason for the suggested tip amount based on the identified contextual feature.
|