spopt
spopt copied to clipboard
The dissimilarity parameter should be able to accept a distance/dissimilarity matrix as an alternative to a callable distance function
I'm currently working on spatial aggregation of energy systems data. Skater seems interesting for my problem and I would like to try it.
However, the issue is that my data is 3-dimensional and has a complex structure. I compute the distance between each region pair and generate a matrix containing this info.
It would be very helpful for my case and many other cases if the dissimilarity could be provided in the form of a pre-computed distance matrix, instead of a distance function.
@ljwolf @knaaptime @xf37 Would any of yall be able to look into this?
Yeah, this should be easy to do. We would need to allow for "dissimilarity='precomputed'", as is common in other sklearn-style estimators.
As it stands @Shruthi-Patil, you could try using sklearn.cluster.AgglomerativeClustering(), which currently supports both precomputed affinity and connectivity constraints?
@ljwolf I’m currently using the same. The results are okayish. That’s why we’re looking for alternatives. :)
Interesting.... well I can take a look at customizing this very soon. I think the diff would be about 6 lines.
Thanks. I look forward to it 😀
@Shruthi-Patil Do you still have any interest in seeing this move forward in #188? If not, we'll go ahead and close it out.
@jGaboardi Thanks for the tweaks. However, we went with another algorithm. So please go ahead and close it.