Skip to content

Commit 845c4a7

Browse files
authored
Update knn-vs-ann.md
1 parent f0fb86b commit 845c4a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/cosmos-db/gen-ai/knn-vs-ann.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Two popular vector search algorithms are k-Nearest Neighbors (kNN) and Approxima
1515
## How kNN works
1616

1717
1. Vectorization: Each data point in the dataset is represented as a vector in a multi-dimensional space.
18-
2. Distance Calculation: To classify a new data point (query point), the algorithm calculates the distance between the query point and all other points in the dataset using a [distance function](distance-function.md).
18+
2. Distance Calculation: To classify a new data point (query point), the algorithm calculates the distance between the query point and all other points in the dataset using a [distance function](distance-functions.md).
1919
3. Finding Neighbors: The algorithm identifies the k closest data points (neighbors) to the query point based on the calculated distances. The value of k (the number of neighbors) is crucial. A small k can be sensitive to noise, while a large k can smooth out details.
2020
4. Making Predictions:
2121
- Classification: For classification tasks, kNN assigns the class label to the query point that is most common among the k neighbors. Essentially, it performs a "majority vote."

0 commit comments

Comments
 (0)