k-Nearest Neighbors (Batch Version)
This algorithm is a batch version of the k-Nearest Neighbors, Cosine Neighbor Similarity, single vertex. It makes a prediction for every vertex whose label is not known (i.e., the attribute for the known label is empty), based on its k nearest neighbors' labels.
Specifications
Characteristic | Value |
Result | The predicted label for the vertices whose label attribute is empty. The result is available in three forms:
|
Input Parameters |
|
Result Size | V = number of vertices |
Time Complexity | O(E^2 / V), V = number of vertices, E = number of edges |
Graph Types | Undirected or directed edges, weighted edges |
Example
For the movie graph shown in the single vertex version, run knn_cosine_all, using topK=3. Then you get the following result:
Last updated