Beginnings of knn trainer.