-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
reproduce original API #2
Comments
@pommedeterresautee when I created this package my primary intention was to be able to utilize an approximate k-nearest-neighbor search in big data sets ( my KernelKnn package was too slow especially if the data set consisted of more than 100.000 observations ). To make this happen I had to structure the NMSlib R6 class in a specific order, so that the output could be used for k-nearest-neighbor queries (Knn_Query() and knn_Query_Batch() ) and also for supervised classification (KernelKnn_nmslib, KernelKnnCV_nmslib) . You can have a look at the R code of the NMSlib R6 class beginning from line 209 here. In those lines I use the createIndex , setQueryTimeParams that you already mentioned (those two correspond to Index_Params and Time_Params in the R6 class). Probably, I could also add a function in the package that consists of Nmslib <- reticulate::import("nmslib")
so that the user has the flexibility to access all the methods of the python Nmslib library (not in a specific order), but I guess this is not necessary as the reticulate package allows nowadays an R user to import any python module / library in R without any restrictions. |
Working directly with reticulate is quite strange (the $ everywhere) and there is certainly space for a full wrapper but I understand what you mean. I close the issue. |
Original API separate different steps of the creation of an index (setup, data loading, index loading OR index creation). There is also function to change parameter of search (setQueryTimeParams). Would it be possible to reproduce this API? It would be easier to reproduce the code of the original project and leverage the existing documentation.
The text was updated successfully, but these errors were encountered: