Reputation: 11
I'd like to detect patterns (sequences) in data flow. For example, we have a continuous stream of data, say, integers:
1 5 1 9 9 9 0 4 5 8 4 9 9 9 0 4 7 2 9 9 9 0 1 4 1
There is the pattern: 9 9 9 0
I need to detect (catch) patterns (sequences) like this. Are such tasks solved by ML? Thanks!
PS: Used platform: net core
EDIT: The fact is that I don’t know which patterns to look for. When initializing (setting), I can only set the pattern parameters (length, repeatability...). I want algo to find some equals parts of data. Somthing like "Change Point Detector" algo in ML. Or somthing like "regular expression", but with data flow.
Upvotes: 1
Views: 681
Reputation: 6528
You may try Knuth–Morris–Pratt algorithm. The algorithm works by finding a word within a string. An example of the same is here:
https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm
Upvotes: 1