Skip to content

Instantly share code, notes, and snippets.

@davideanastasia
Created February 2, 2019 12:26
Show Gist options
  • Save davideanastasia/e7e40b711b8182c6f2cf291c32945bc0 to your computer and use it in GitHub Desktop.
Save davideanastasia/e7e40b711b8182c6f2cf291c32945bc0 to your computer and use it in GitHub Desktop.
taxi_data_matrix = csr_matrix(taxi_data_pivot.values)
from sklearn.neighbors import NearestNeighbors
model_knn = NearestNeighbors(metric = 'cosine', algorithm='brute')
model_knn.fit(taxi_data_matrix)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment