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

Alternative metrics #24

Open
3bst0r opened this issue Jun 4, 2016 · 1 comment
Open

Alternative metrics #24

3bst0r opened this issue Jun 4, 2016 · 1 comment

Comments

@3bst0r
Copy link

3bst0r commented Jun 4, 2016

It would be awesome if we could choose between several distance measures (e.g. jaccard).

@lvdmaaten
Copy link
Owner

There is some discussion on that here: #7

It should be straightforward to add additional distance measures, as long as these are metric: that is, as long as they satisfy the triangle inequality, identity of indiscernibles, and are symmetric.

You can implement the distance measures in the same way as here:

double euclidean_distance(const DataPoint &t1, const DataPoint &t2) {

Then use your new function to as input to the templated VPTree constructor:

bhtsne/tsne.cpp

Line 435 in 002cddf

VpTree<DataPoint, euclidean_distance>* tree = new VpTree<DataPoint, euclidean_distance>();

@3bst0r 3bst0r changed the title Alternative distance measures Alternative metrics Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants