I am trying to use
KNeighborsClassifier(n_neighbors=15, algorithm='ball_tree', metric='correlation')
However, I get the error
ValueError: Metric 'correlation' not valid for algorithm 'ball_tree'
Why is it not possible to use ball_tree? Am I limited to using brute? I have a huge matrix and would like to avoid brute. But, I can't pass in a custom metric that computes the pearson correlation between two vectors because the triangle inequality is not preserved. Any alternatives to this?
I am on scikit-learn==0.18.1