1
$\begingroup$

I have a cosine similarity matrix where I want to adjust it to inputto t-sne. I fond the following explanation in a FAQ. As mentioned there I have made the diagonals to zero. what does it mean by symmetrize the pairwise similarity matrix, and normalize it to sum up to one?

Can I use a pairwise similarity matrix as input into t-SNE?

Yes you can! For instance, we successfully applied t-SNE on a dataset of word association data. Download the Matlab implementation, make sure the diagonal of the pairwise similarity matrix contains only zeros, symmetrize the pairwise similarity matrix, and normalize it to sum up to one. You can now use the result as input into the tsne_p.m function.

$\endgroup$

1 Answer 1

1
$\begingroup$

You need to scale the values by some constant factor so the sum of every entry in the matrix results in 1.0.

You can achieve this by using mat /= mat.sum(), where mat is your matrix.

$\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.