Is there a way to get a weight into the
from sklearn.metrics import pairwise_distances
In the scipy cosine distance it's possible to add in an array for weights, but that doesn't give a pairwise matrix.
a = np.array([9,8,7,5,2,9]) b = np.array([9,8,7,5,2,2]) w = np.array([1,1,1,1,1,1]) distance.cosine(a,b,w)
w is the weights.