Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more distance functions #6

Open
doxakis opened this issue Mar 17, 2018 · 0 comments
Open

Add more distance functions #6

doxakis opened this issue Mar 17, 2018 · 0 comments

Comments

@doxakis
Copy link
Owner

doxakis commented Mar 17, 2018

It would be great to have more distance functions ready to use.

The python lib implements lot of metrics.
http://hdbscan.readthedocs.io/en/latest/basic_hdbscan.html#distance-matrices

The following file expose distance functions:
https://github.com/scikit-learn-contrib/hdbscan/blob/master/hdbscan/dist_metrics.pyx

Some distance functions:

  • Chebyshev Distance
  • Minkowski Distance
  • W-Minkowski Distance
  • Mahalanobis Distance
  • Hamming Distance
  • Canberra Distance
  • Bray-Curtis Distance
  • Jaccard Distance
  • Matching Distance
  • Dice Distance
  • Kulsinski Distance
  • Rogers-Tanimoto Distance
  • Russell-Rao Distance
  • Sokal-Michener Distance
  • Sokal-Sneath Distance
  • Haversine Distance (2 dimensional)
  • Yule Distance

In the following folder: HdbscanSharp/Distance/
There is some examples. (For example, see ManhattanDistance)
It must implements IDistanceCalculator.

If there is some limitation, it can throw a meanful exception with explications.
For example, if the distance works only for 2 dimension, throw an exception.

I suggest to add one class for each new distance function and add minimal documentation (Description, formula and suggested use case if any. Check wikipedia).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant