# Compute probability from distance-score

I compute Euclidian distances between a point I want to analyze and a set of points I have. I want to sort my points by decreasing "similarity".

I used to compute a "score" by inverting the distance ($s=1/d$), and use the $\cfrac{s_i}{\sum_k s_k}$ as a similarity that varies between $0$ and $1$.

I have seen that the $softmax$ function can also be used, the difference being that it uses $e^d$ as the score.

Which function would be closer to computing a kind of "probability"? I should apologize for probably mixing terms...

• Probability of what? Both give nonnegative scores that sum to one. Neither is particularly anything like a probability. Softmax will decay quickly beyond the closest point, while the sum one will distribute scores more widely. – Dougal Feb 4 '17 at 1:40
• If you're not familiar, you might want to look at kernels. – Dougal Feb 4 '17 at 1:42
• @Dougal, thank you, your first comment answers my question ... and your second one gives me homework ;) If you add that as an answer I'll accept it. – Matthieu Feb 4 '17 at 11:53