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

Custom Metric #99

Open
bhavaygg opened this issue May 21, 2021 · 3 comments
Open

Custom Metric #99

bhavaygg opened this issue May 21, 2021 · 3 comments

Comments

@bhavaygg
Copy link

Hello,

I wanted to perform NN on a dataset of genomes. For this task, the distance between 2 datapoints is calculated by a custom script? Is there I can incorporate this without having to create the entire NN search algorithm myself and only modify some parts of your code?

@masajiro
Copy link
Member

Hello,
There is no function to use the metric that users defined on NGT. However, you can incorporate your metric into NGT like jaccard and poincare and lorentz.

@bhavaygg
Copy link
Author

@masajiro Does the library accept strings as datapoints? Because my datapoints are essentially file names that are input to a script to calculate distance.

@masajiro
Copy link
Member

NGT can handle uint8 objects, but cannot handle variable length objects. However, if the length of your strings is less than around 1000 characters, you might be able to store the strings into NGT as fixed length objects with zero padding. This is similar to your case.

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