Certain embodiments involve learning user preferences and predicting user behavior based on sequential user behavior data. For example, a system obtains data about a sequence of prior actions taken by multiple users. The system determines a similarity between a prior action taken by the various users and groups the various users into groups or clusters based at least in part on the similarity. The system trains a machine-learning algorithm such that the machine-learning algorithm can be used to predict a subsequent action of a user among the various users based on the various clusters. The system further obtains data about a current action of a new user and determines which of the clusters to associate with the new user based on the new user's current action. The system determines an action to be recommended to the new user based on the cluster associated with the new user. The action can include a series or sequence of actions to be taken by the new user. The system further provides the series or sequence of actions or an action of the series or sequence to the new user.
Please help me write a proper abstract based on the patent claims. CLAIM: 1. A method for learning user preferences for accurately predicting user behavior based on sequential user behavior data, the method comprising: obtaining, by a processor, a data set, the data set indicating a sequence of prior actions taken by a plurality of users; grouping, by the processor, the plurality of users to form a plurality of user clusters based at least in part on a similarity between a prior action taken by the plurality of users; using, by the processor, the plurality of user clusters to train a machine-learning algorithm, the machine-learning algorithm usable to predict a subsequent action of a user of the plurality of users; obtaining, by the processor, user data indicating a current action of a subsequent user; determining, by the processor, a user cluster of the plurality of user clusters to associate with the subsequent user based on the current action using the machine-learning algorithm; and determining, by the processor, a recommended sequence of actions to be provided to the subsequent user based on the user cluster and the current action using the machine-learning algorithm. 2. The method of claim 1, wherein grouping, by the processor, the plurality of users to form the plurality of user clusters comprises: comparing, by the processor, a first action taken by a first user of the plurality of users and a second action taken by a second user of the plurality of users to determine a similarity between the first action and the second action; and grouping, by the processor, the first user and the second user to form a first user cluster based on the similarity. 3. The method of claim 1, wherein determining the recommended sequence of actions to be provided to the subsequent user using the machine-learning algorithm comprises iteratively determining the user cluster of the plurality of user clusters to associate with the subsequent user using the machine-learning algorithm, wherein each iteration comprises: obtaining, by the processor, data indicating another action of the subsequent user; determining, by the processor, a user cluster of the plurality of clusters to associate with the subsequent user based on the other action using the machine-learning algorithm; and determining, by the processor, another recommended sequence of actions to be provided to the subsequent user based on the user cluster of the plurality of clusters and the other action using the machine-learning algorithm. 4. The method of claim 1, wherein the data set indicating the sequence of prior actions taken by the plurality of users further comprises data indicating a sequence of prior locations associated with the plurality of users. 5. The method of claim 4, further comprising: determining, by the processor, a trajectory associated with each user of the plurality of users, wherein the trajectory indicates an order of prior locations associated with the user, and wherein grouping the plurality of users to form the plurality of user clusters further comprises grouping the plurality of users based at least in part on a similarity between trajectories associated with the plurality of users. 6. The method of claim 5, wherein determining the recommended sequence of actions to be provided to the subsequent user using the machine-learning algorithm comprises determining a recommended sequence of locations to be provided to the subsequent user. 7. The method of claim 1, further comprising outputting, by the processor, a first action of the recommended sequence of actions to the subsequent user. 8. A system comprising: a processing device; and a non-transitory computer-readable medium communicatively coupled to the processing device, wherein the processing device is configured to perform operations comprising: obtaining a data set indicating a sequence of prior actions taken by a plurality of users; grouping the plurality of users to form a plurality of user clusters based at least in part on a similarity between a prior action taken by the plurality of users; using the plurality of user clusters to train a machine-learning algorithm, the machine-learning algorithm usable to predict a subsequent action of a user of the plurality of users; obtaining user data indicating a current action of a subsequent user; determining a user cluster of the plurality of user clusters to associate with the subsequent user based on the current action using the machine-learning algorithm; and determining a recommended sequence of actions to be provided to the subsequent user based on the user cluster and the current action using the machine-learning algorithm. 9. The system of claim 8, wherein the processing device is further configured to group the plurality of users to form the plurality of user clusters by: comparing a first action taken by a first user of the plurality of users and a second action taken by a second user of the plurality of users to determine a similarity between the first action and the second action; and grouping the first user and the second user to form a first user cluster based on the similarity. 10. The system of claim of claim 8, wherein the processing device is further configured to determine the recommended sequence of actions to be provided to the subsequent user using the machine-learning algorithm by: iteratively determining the user cluster of the plurality of user clusters to associate with the subsequent user using the machine-learning algorithm, wherein each iteration comprises: obtaining data indicating another action of the subsequent user; determining a user cluster of the plurality of clusters to associate with the subsequent user based on the other action using the machine-learning algorithm; and determining another recommended sequence of actions to be provided to the subsequent user based on the user cluster of the plurality of clusters and the other action using the machine-learning algorithm. 11. The system of claim 8, wherein the data set indicating the sequence of prior actions taken by the plurality of users further comprises data indicating a sequence of prior locations associated with the plurality of users. 12. The system of claim 11, wherein the processing device is further configured to determine a trajectory associated with each user of the plurality of users, wherein the trajectory indicates an order of prior locations associated with the user, and wherein the processor is further configured to group the plurality of users to form the plurality of user clusters by: grouping the plurality of users based at least in part on a similarity between trajectories associated with the plurality of users. 13. The system of claim 12, wherein the processing device is further configured to determine the recommended sequence of actions to be provided to the subsequent user by determining a recommended sequence of locations to be provided to the subsequent user. 14. The system of claim 8, wherein the processing device is further configured to output a first action of the recommended sequence of actions to the subsequent user. 15. A non-transitory computer-readable medium storing program code executable by a processor for learning user preferences for accurately predicting user behavior based on sequential user behavior data, the program code comprising: program code for obtaining, by the processor, a data set indicating a sequence of prior actions taken by a plurality of users; program code for grouping, by the processor, the plurality of users to form a plurality of user clusters based at least in part on a similarity between a prior action taken by the plurality of users; program code for using, by the processor, the plurality of user clusters to train a machine-learning algorithm, the machine-learning algorithm usable to predict a subsequent action of a user of the plurality of users; program code for obtaining, by the processor, user data indicating a current action of a subsequent user; program code for determining, by the processor, a user cluster of the plurality of user clusters to associate with the subsequent user based on the current action using the machine-learning algorithm; and program code for determining, by the processor, a recommended sequence of actions to be provided to the subsequent user based on the user cluster and the current action using the machine-learning algorithm. 16. The non-transitory computer-readable medium of claim 15, wherein grouping the plurality of users to form the plurality of user clusters comprises: comparing, by the processor, a first action taken by a first user of the plurality of users and a second action taken by a second user of the plurality of users to determine a similarity between the first action and the second action; and grouping, by the processor, the first user and the second user to form a first user cluster based on the similarity. 17. The non-transitory computer-readable medium of claim 15, wherein determining the recommended sequence of actions to be provided to the subsequent user using the machine-learning algorithm comprises iteratively determining the user cluster of the plurality of user clusters to associate with the subsequent user, wherein each iteration comprises: obtaining, by the processor, data indicating another action of the subsequent user; determining, by the processor, a user cluster of the plurality of clusters to associate with the subsequent user based on the other action using the machine-learning algorithm; and determining, by the processor, another recommended sequence of actions to be provided to the subsequent user based on the user cluster of the plurality of clusters and the other action using the machine-learning algorithm. 18. The non-transitory computer-readable medium of claim 15, wherein the data set indicating the sequence of prior actions taken by the plurality of users further comprises data indicating a sequence of prior locations associated with the plurality of users. 19. The non-transitory computer-readable medium of claim 18, wherein the program code further comprises: program code for determining, by the processor, a trajectory associated with each user of the plurality of users, wherein the trajectory indicates an order of prior locations associated with the user, and wherein grouping the plurality of users to form the plurality of user clusters further comprises grouping the plurality of users based at least in part on a similarity between trajectories associated with the plurality of users, and wherein determining the recommended sequence of actions to be provided to the subsequent user comprises determining a recommended sequence of locations to be provided to the subsequent user. 20. The non-transitory computer-readable medium of claim 15, wherein the program code further comprises: program code for outputting, by the processor, a first action of the recommended sequence of actions to the subsequent user.