In FlowJo 10.9.0 and later, a cosine similarity matrix (CSM) is automatically created when a compensation matrix is calculated in the compensation wizard. The CSM can be visualized and/or exported from the Compensation Matrix Preview/Edit window as shown below.
Cosine similarity is a measure of similarity between two non-zero vectors defined in an inner product space. Cosine similarity is the cosine of the angle between the vectors. That is, it is the dot product of the vectors divided by the product of their lengths. It follows that the cosine similarity does not depend on the magnitudes of the vectors, but only on their angle.
The cosine similarity always belongs to the interval [-1,1]. For example, two proportional vectors have a cosine similarity of 1, two orthogonal vectors have a similarity of 0, and two opposite vectors have a similarity of -1. When calculating the cosine similarity of two fluorochromes, the component values of the vectors cannot be negative, in which case the cosine similarity is bounded in [0,1].
In the context of flow cytometry, a CSM can be calculated from single color compensation controls, providing a pairwise comparison of the similarity between emission spectra of all fluorochromes employed in a staining panel. This information can be used in the panel design process to inform on the degree of similarity between fluorochromes. High cosine similarity scores (closer to 1) between fluorochrome pairs generally indicate higher compensation values and increased spillover spreading will occur between those two fluorochromes if used in the same staining panel, and these combinations may want to be avoided. Employing fluorochrome combinations that have low cosine similarity scores (closer to 0) will generally produce better results with lower compensation values and lower spillover spreading, yielding increased sensitivity to detect low expressing antigens within populations that co-express that pair of fluorochromes.