Dear all, This is my first post on this forum. May be it is a feature request or about something I don't know how to get it work. My question is on BallTree algorithm with custom metrics.
I am working with a dataset for which I was calculating two point correlation with one distance metric using BallTree algorithm. Say import numpy as npfrom sklearn.neighbors import BallTree np.random.seed(0) X = np.random.random((30, 3)) r = np.linspace(0, 1, 5) tree = BallTree(X,metric='euclidean') tree.two_point_correlation(X, r) Now, I want to calculate two-point correlation based on two different metrics. Imagine I want to find correlation based on their distances on XZ and YZ planes - group neighbors based on two distances instead of one. Say I want to find correlation within r1 and r2 bins based on two different distance metrics say something like r1 = np.linspace(0, 1, 5) r2 = np.linspace(0, 1, 5) tree = BallTree(X,metric1=’euclidean2D’,metric2=’euclidean2D’) tree.two_point_correlation(X, r1, r2) How can I go about doing that? Goal is to get a contour plot of two-point correlation with r1 and r2 as axes. Any help on this would be great! Thanks in advance, Rohin.
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn