The overall diagram of KNN kernel is shown in the figure below:
Building Blocks:
- CSV Parser(DataAnalytic Library L1 Primitive) CSV Parser: parse input csv file according to schema configurations, output spatial object coordinate (x, y) and index.
- Distance: compute distance between base location and spatial object location; Euclidean distance is applied.
- Sort Top-K(Graph Library L1 Primitive) : sort distance in ascending order and keep top-k objects.