yahoojapan / NGT

Nearest Neighbor Search with Neighborhood Graph and Tree for High-dimensional Data
Apache License 2.0
1.25k stars 114 forks source link

What is dimension parameter in create function? #35

Closed ilham-bintang closed 5 years ago

ilham-bintang commented 5 years ago

What is exactly dimension parameter in create function?

I use NGTpy.

And encounter issue:

ngtpy::insert: Error! dimensions are inconsitency. 20:600

masajiro commented 5 years ago

Since NGT provides nearest neighbors search for vectors, you have to specify the number of dimensions of vectors that you want to search for. From the error message, although the number of dimensions of your vectors that you specified for the insertion is 600, the specified number of the dimension for the creation is 20. If 600 is what you expect, you have to specify 600 for the dimension parameter of the creation. If your data are binary, 600 is treated as 600 x 8 bits.

ilham-bintang commented 5 years ago

it work. thank you