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开发者_如何学Python 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.
精彩评论