Python implementation of KNN and DTW classification algorithm