0
$\begingroup$

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.

$\endgroup$
0
$\begingroup$

Some ideas: You say

the best alignment would be the most appropriate match

irrespective of direction. So to find (in the data) a closest match, use both the data say 10011101 and its reverse 10111001, find the closest match, and measure the distance with some appropriate distance, maybe a edit distance or some other appropriate string metric. Then you can calculate a distance (or similarity) matrix on your string sample, and using that, using some method of multidimensional scaling (MDS), which gives you, for each string, a vector of coordinates in some low-dimensional euclidean space. You can use those as your features, or at least try it out.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.