# Self-similarity matrix

In data analysis, the self-similarity matrix is a graphical representation of similar sequences in a data series.

Similarity can be explained by different measures, like spatial distance (distance matrix), correlation, or comparison of local histograms or spectral properties (e.g. IXEGRAM[1]). This technique is also applied for the search of a given pattern in a long data series as in gene matching.[citation needed] A similarity plot can be the starting point for dot plots or recurrence plots.

## Definition

To construct a self-similarity matrix, one first transforms a data series into an ordered sequence of feature vectors ${\displaystyle V=(v_{1},v_{2},\ldots ,v_{n})}$, where each vector ${\displaystyle v_{i}}$ describes the relevant features of a data series in a given local interval. Then the self-similarity matrix is formed by computing the similarity of pairs of feature vectors

${\displaystyle S(j,k)=s(v_{j},v_{k})\quad j,k\in (1,\ldots ,n)}$

where ${\displaystyle s(v_{j},v_{k})}$ is a function measuring the similarity of the two vectors, for instance, the inner product ${\displaystyle s(v_{j},v_{k})=v_{j}\cdot v_{k}}$. Then similar segments of feature vectors will show up as path of high similarity along diagonals of the matrix.[2] Similarity plots are used for action recognition that is invariant to point of view [3] and for audio segmentation using spectral clustering of the self-similarity matrix.[4]

## Example

Similarity plot, a variant of recurrence plot, obtained for different views of human actions are shown to produce similar patterns.[5]

1. ^ M. A. Casey; A. Westner (July -00 2000). "Separation of mixed audio sources by independent subspace analysis" (PDF). Proc. Int. Comput. Music Conf. Retrieved 2013-11-19. Check date values in: |date= (help)