Anomaly Detection with k-nearest neighbor algorithm. In the training, only the feature vectors are kept. In the actual classification stage, a vector in the feature space of the sample whose class is unknown is given. The distance between this new vector and a set of existing vectors is calculated and defining the average as anomaly score.
ArakawaYuito/AD_k-NearestNeighbor
Anomaly Detection with k-nearest neighbor algorithm.
Jupyter Notebook