kgraph | A library for k-nearest neighbor search | Machine Learning library

 by   aaalgo C++ Version: Current License: BSD-2-Clause

kandi X-RAY | kgraph Summary

kandi X-RAY | kgraph Summary

kgraph is a C++ library typically used in Artificial Intelligence, Machine Learning, Deep Learning applications. kgraph has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

KGraph is a library for k-nearest neighbor (k-NN) graph construction and online k-NN search using a k-NN Graph as index. KGraph implements heuristic algorithms that are extremely generic and fast: * KGraph works on abstract objects. The only assumption it makes is that a similarity score can be computed on any pair of objects, with a user-provided function. * KGraph is among the fastest of libraries for k-NN search according to [recent benchmark] For best generality, the C++ API should be used. A python wrapper is provided under the module name pykgraph, which supports Euclidean and Angular distances on rows of NumPy matrices.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              kgraph has a low active ecosystem.
              It has 305 star(s) with 77 fork(s). There are 24 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 13 open issues and 18 have been closed. On average issues are closed in 43 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of kgraph is current.

            kandi-Quality Quality

              kgraph has no bugs reported.

            kandi-Security Security

              kgraph has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              kgraph is licensed under the BSD-2-Clause License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              kgraph releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of kgraph
            Get all kandi verified functions for this library.

            kgraph Key Features

            No Key Features are available at this moment for kgraph.

            kgraph Examples and Code Snippets

            No Code Snippets are available at this moment for kgraph.

            Community Discussions

            QUESTION

            Export additional interfaces for CommonJS module (Typescript)
            Asked 2017-Oct-13 at 12:40

            I'm trying to use a simple JS library in Typescript/React, but am unable to create a definition file for it. The library is google-kgsearch (https://www.npmjs.com/package/google-kgsearch). It exports a single function in the CommonJS style. I can successfully import and call the function, but can't figure out how to reference the type of the arguments to the result callback.

            Here is most of the library code:

            ...

            ANSWER

            Answered 2017-Oct-13 at 12:40

            The issue here is easily resolved. The problem is that while you have exported KGSearch, you have not exported the namespace KGS that contains the types. There are several ways to go about this, but the one I recommend is to take advantage of Declaration Merging

            Your code will change as follows

            Source https://stackoverflow.com/questions/45404041

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install kgraph

            KGraph depends on a recent version of GCC with C++11 support, cmake and the Boost library. The package can be built and installed with. A Makefile.plain is also provided in case cmake is not available. The Python API can be installed with.
            Both index.build and index.search supports a number of optional keywords arguments to fine tune the performance. The default values should work reasonably well for many datasets. One exception is that reverse=-1 should be added if the purpose of building index is to speedup search, which is the typical case, rather than to obtain the k-NN graph itself. Two precautions should be taken: * Although matrices of both float32 and float64 are supported, the latter is not optimized. It is recommened that matrices be converted to float32 before being passed into kgraph. * The dimension (columns of matrices) should be a multiple of 4. If not, zeros must be padded. For performance considerations, the Python API does not support user-defined similarity function, as the callback function is invoked in such a high frequency that, if written in Python, speedup will inevitably be brought down. For the full generality, the C++ API should be used.
            The KGraph C++ API is based on two central concepts: the index oracle and the search oracle. (Oracle is a fancy way of calling a user-defined callback function that behaves like a black box.) KGraph works solely with object IDs from 0 to N-1, and relies on the oracles to map the IDs to actual data objects and to compute the similarity. To use KGraph, the user has to extend the following two abstract classes. The similarity values computed by the oracles must satisfy the following two conditions: * The more similar the objects are, the smaller the similarity value (0.1 < 10, -10 < 1). * Similarity must be symmetric, i.e. f(a, b) = f(b, a). KGraph’s heuristic algorithm does not make assumption about properties such as triangle-inequality. If the similarity is ill-defined, the worst it can do is to lower the accuracy and to slow down computation.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/aaalgo/kgraph.git

          • CLI

            gh repo clone aaalgo/kgraph

          • sshUrl

            git@github.com:aaalgo/kgraph.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link