Ordngrams
Ordngrams are a variant of n-grams that encode only the relative order of elements within a fixed-length window of a sequence. Instead of recording the exact tokens or values, ordngrams preserve the order relations among the items in each window. This makes ordngrams invariant to monotone transformations of the data and useful for analyzing patterns that depend on structure rather than content, such as stylistic or rhythmic patterns in text, music, or event logs.
Formally, let S = s1, s2, ..., sN be a sequence and let k be the window length. For
Ordngrams can be compared by their rank patterns, and standard data structures such as hashing or trie-like
Limitations include loss of content information, sensitivity to window size and tie-handling, and potentially high dimensionality