I'm currently trying to implement the MPdist (matrix profile distance) algorithm for time-series data, but I've developed a new distance metric that I'd like to use in place of the Euclidean metric. I've implemented an algorithm that techincally works, however I used brute force to compute the distance between every subsequence of every time series that I'm using.
As such, it's horribly inefficient. I want to use a similiarity join algorithm to get complexity down. Still, they're really not my area of expertise and most algorithms I've seen are not very transparent and make critical use of Euclidean distance for calculating the 1NN similarity join.
Could someone point me to an article which is perhaps a little more transparent and is such that I could more easily replace the Euclidean metric with another? Or a github repo or something. I only need 1NN