Calculating Similarities: Similarity Score
Next, for each pair of genes, we multiply the values from each sample, add up the products, and divide by the number of samples (5). This operation is known as the dot product in vector algebra. The result is the similarity score. For example, for Gene A and Gene B, you have:
Gene A | Gene B | Product | |
---|---|---|---|
Sample 1 | 1.166744 | 0.099756 | 0.116389 |
Sample 2 | −0.01659 | −0.39902 | 0.00662 |
Sample 3 | 0.938726 | 1.649106 | 1.548059 |
Sample 4 | −0.50801 | −1.4496 | 0.736406 |
Sample 5 | −1.58087 | 0.099756 | −0.1577 |
Sum | 2.249774 | ||
Similarity Score | 0.449955 |