pyclustering
pyclustering copied to clipboard
clarans similarity instead of distance?
Hello, is there a way to use similarity isntead of distance in CLARANS algorithm? if yes cud u show us where to add changes in ur code? and does it necessarily have to be a point of two coordinate? or the length of the tuple doesn't matter?
Hello, @TyrandeWhisperwind ,
Euclidean distance is considered as a similarity between objects. What kind of similarity do you want to see? Currently, there is no way to specify another distance metric.
Point is considered as an abstract object, length of object can be from 1 to N, for example, data may looks like: X = [ [x11, x12, x13, ..., x1N], [x21, x22, x23, ..., x2N], ... [xM1n, xM2, xM3, ..., xMN]].
Hi, thank you for your replay, I wanted to use "Pearson similarity", but I did change it to "Pearson distance" using this formula: https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/pear_dis.htm I did read your CLARANS code it seems like it can only use Euclidean distance, and it would be much more better if we could pass to your CLARANS code a distance matrix like you did with dbscan and kmedoids, but still it is a helpful code I can change it to make it use my pearson distance. Thank you so much for your contribution Andrei !
@TyrandeWhisperwind, I will introduce opportunity to use specific metric for CLARANS algorithm in the next release - 0.9.1. Thank you for the issue!
- [ ] Argument to specify distance metric for CLARANS algorithm.