How to set Cosine similarity as distance method with the Python Wrapper?
From GettingStarted.md I figured that we can use L2 distance by:
SPTAG.AnnIndex.SetBuildParam("DistCalcMethod", "L2")
What is the value for cosine similarity distance?
I believe it is Cosine.
@m0baxter Using the same code as Singlebox PythonWrapper section in GettingStarted.md I tried Test('BKT', 'Cosine') and the search result is:
[0, 1, 2] [1.0, 1.0, 1.0] [0, 1, 2] [-5.324554920196533, -5.324554920196533, -5.324554920196533] [0, 1, 2] [-11.649109840393066, -11.649109840393066, -11.649109840393066]
I believe it should be the same as Test('BKT', 'L2'), which is:
[0, 1, 2] [0.0, 10.0, 40.0] [2, 1, 3] [0.0, 10.0, 10.0] [4, 3, 5] [0.0, 10.0, 10.0]
Also any tag other than "L2" would gives the first result.