Version with knn model.