Optimal matching is a sequence analysis method used in social science, to assess the dissimilarity of ordered arrays of tokens that usually represent a time-ordered sequence of socio-economic states two individuals have experienced. Once such distances have been calculated for a set of observations (e.g. individuals in a cohort) classical tools (such as cluster analysis) can be used. The method was tailored to social sciences from a technique originally introduced to study molecular biology (protein or genetic) sequences (see sequence alignment). Optimal matching uses the Needleman-Wunsch algorithm.
Algorithm Let S = ( s 1 , s 2 , s 3 , … s T ) {\displaystyle S=(s_{1},s_{2},s_{3},\ldots s_{T})} be a sequence of states s i {\displaystyle s_{i}} belonging to a finite set of possible states. Let us denote S {\displaystyle {\mathbf {S} }} the sequence space, i.e. the set of all possible sequences of states. Optimal matching algorithms work by defining simple operator algebras that manipulate sequences, i.e. a set of operators a i : S → S {\displaystyle a_{i}:{\mathbf {S} }\rightarrow {\mathbf {S} }} . In the most simple approach, a set composed of only three basic operations to transform sequences is used:
one state s {\displaystyle s} is inserted in the sequence a s ′ I n s ( s 1 , s 2 , s 3 , … s T ) = ( s 1 , s 2 , s 3 , … , s ′ , … s T ) {\displaystyle a_{s'}^{\rm {Ins}}(s_{1},s_{2},s_{3},\ldots s_{T})=(s_{1},s_{2},s_{3},\ldots ,s',\ldots s_{T})}
… excerpt ends here. Continue reading the full article.
