microsoft / microsoft/SPTAG

How to set Cosine similarity as distance method with the Python Wrapper?

Open
#56 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

answered question
Dominant language
C++
Stars
5k
Forks
622
Avg merge
8h 37m
Merged PRs (30d)
5

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with GettingStarted.md and trace the Python wrapper's handling of SetBuildParam("DistCalcMethod", ...). Verify the supported cosine-similarity value in the documented or referenced implementation, then update the documentation to state it clearly and confirm the example remains accurate.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.