0
$\begingroup$

I am using the dot product as a way to measure the similarly of two facial-model vectors extracted by a ML algorithm (OpenFace in fact).

I would like to convert the L2 norm to a probability U[0,1] in order to compare with other solutions from other providers that map directly to probabilities but in a blackbox fashion.

By probability I mean the probability that the two vectors represent the same person. So an identical image would give a probability of 1; images of the same person would give a high probability; and orthogonal images (different people, or some suitable toy case) would in the limit have such a probability of zero.

I'd like a uniform distribution for comparison with other providers, but this boils down to knowing what the underlying probability distribution of the feature vectors is.

How do I do this?

  1. Rayleigh distribution CDF
  2. Cosine similarity
  3. (1) is the same as (2)
  4. Draw from a simulated distribution
  5. Arbitrarily scale to U[0,1]
  6. Train into the comparison probability space directly (skipping the feature-vector step)
  7. None of the above
  8. Something else?

Some useful links are:

Cosine similarity versus dot product as distance metrics

http://blog.christianperone.com/2013/09/machine-learning-cosine-similarity-for-vector-space-models-part-iii

http://houseofjeff.com/2015/05/10/using-probability-distribution-and-cosine-similarity-to-automatically-detect-data-contents - this one is almost there?

$\endgroup$
  • $\begingroup$ Also: If the question is unclear, or better suited to a different stackexchange site, please ask for clarification/give constructive feedback rather than simply downvoting. If it's already answered elsewhere please advise. $\endgroup$ – jtlz2 Apr 5 '18 at 7:09
  • $\begingroup$ I haven't downvoted your question but my question here would be: probability of what? $\endgroup$ – Konstantin Apr 5 '18 at 9:39
  • $\begingroup$ @Konstantin Thanks for the helpful feedback - I hope my update clarifies? $\endgroup$ – jtlz2 Apr 5 '18 at 9:52
  • $\begingroup$ Cosine similarity seems plausible(+1) It's nice Query. Not sure why downvoting is there.. $\endgroup$ – Aditya Apr 5 '18 at 10:09
1
$\begingroup$

I guess you either need to train directly into probability space, or train another model on top of the feature vectors to learn the probability of two vectors belonging to the same person.

All the other metrics you could use on top of the feature vectors are a bit arbitrary, as they were not considered by the cost function used when training the original model.

| improve this answer | |
$\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.