title: Using cosine distance with scikit learn KNeighborsClassifier
body: <p>Is it possible  to use something like 1 - cosine similarity with scikit learn's KNeighborsClassifier?</p>
  <p><a href="https://stackoverflow.com/questions/23032628/why-does-scikit-learns-nearest-neighbor-doesnt-seem-to-return-proper-cosine-si">This</a> answer says no, but on the <a href="http://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html" rel="noreferrer">documentation</a> for KNeighborsClassifier, it says the metrics mentioned in <a href="http://scikit-learn.org/stable/modules/generated/sklearn.neighbors.DistanceMetric.html" rel="noreferrer">DistanceMetrics</a> are available. Distance metrics don't include an explicit cosine distance, probably because it's not really a distance, but supposedly it's possible to input a function into the metric. I tried inputting the scikit learn linear kernel into KNeighborsClassifier but it gives me an error that the function needs two arrays as arguments. Anyone else tried this?</p>