I have data which is a binary string, e.g. 10001001 or 111100000001. The length can vary between 3 and 13 characters in length. It represents a pattern found in nature where the length is variable and something is either happening (1) or not happening (0). All of the patterns start and end with a 1, but in between, there can be any combination of 0s and 1s.
One problem is that if you take the pattern 1111, it should be considered equally similar to both 1001111 and 1111001, i.e. there is no left or right direction - actually, the best alignment would be the most appropriate match.
Note: This data can be easily clustered using an algorithm such as NJ or UPGMA using the xor distance of the best alignment. Additionally, the clusters have shown that this is very important information. However, I need to find a way to actually encode it as an SVM feature, such that the class of novel data could be predicted with it.
Is any strategy that I can use to encode this variable length binary string as a set of meaningful svm features?
It would not work to convert each binary digit to an individual feature, since the string length is variable and the alignment is important.