简体   繁体   中英

Predicting probability of patterns from a dynamic unordered set

Let's say a user can input one of three distinct elements: {A, B, C}

As the user continues to put in these values, is there a way to predict probabilities of which value would be next, which next two values, and which next three?

If so, can you please reference me to an algorithm that I can read up on? Or some code samples?

Read up on n-grams . You can use them to determine the probability of the next character(s) given the recent characters entered.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM