# Anomaly Detection in Discrete Sequences

So, I have a set of discrete sequences, let's say, composed by letters, representing a certain action:

A -> B -> C -> D
B -> E -> A -> C
...


My objective is to, given an incoming sequence, detect if it is anomalous or not (unsurpervised, since we do not know what "anomalous" is at the beggining).

However, most of the algorithms and packages are for numerical data. If I do a one-hot-encoding strategy, I would get that a certain action "is bigger than" another one (since it is treated as numerical) which should be correct.

Is there any other strategy for discrete sequences? I found some papers but they are all theoretical, and not with practical examples (for python in this case).

Thanks!

• A sequence or graph embedding into a continious vector could be useful Jan 15 at 21:35
• How long are typical sequences, and how many possibilities are there for each item? Can the length vary? Can a particular item be occur multiple times? Jan 15 at 21:40