What is the different between Dijsktra's algorithm and KNN?
What is the different between Dijsktra's algorithm and KNN?


Almost everything.

$k$ nearest neighbor is a classification algorithm. It stores a list of [(features1, label1), (features2, label2), ..., (features-n, label-n)]. When it gets a new item features it calculates the distance to each of the $n$ stored items. It finds the $k$ closest ones. It returns the label which is most often in those $k$ examples.

Dijkstras algorithm is a graph search algorithm. It takes a graph $G = (V, E)$, a start node $s \in V$ and a target node $t \in V$ as input and returns the shortest path (v_1, \dots, v_n) with $v_1, \dots, v_n \in V$ from $s$ to $t$.

(You might be interested in the label correction algorithm, a generalization of Dijkstras algorithm)

How they can be related. Somehow.

$k$ nearest neighbor can also operate on graphs. If you have a graph-like structure and your distance measure is e.g. the number of hops from a node, then you would use breadth first search.