Giter Site home page Giter Site logo

geonux / covertree Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aman-tiwari/covertree

0.0 2.0 0.0 30.25 MB

Cover Tree implementation in C++ for k-Nearest Neighbours and range search

License: Apache License 2.0

Makefile 0.10% Python 0.05% CMake 0.20% C++ 85.84% C 13.81% Shell 0.01%

covertree's Introduction

This is a fork of Manzil Zaheer's multithreaded CoverTree implementation, with modifications to store feature-ids as well as features & an embedded Mongoose asynchronous HTTP server to enable queries to be made over HTTP.

To use,

  1. Modify config.json so that the filepaths point to your list of filenames and your file of features, i.e
{"19" : [
            {"region" : "<Name of this dataset>",
             "data" : "<Filepath of data>",
             "filenames" : "<List of filenames that correspond to the data>"},
    
            {"region" : "<Another dataset>",
             "data" : "<Filepath of data>",
             "filenames" : "<List of filenames that correspond to the data>"}
        ]
}

Currently, the datafile format is <int number of points><int number of dimensions><array of doubles of point data>. The file data/convert.py converts a .t7 file that contains an array of feature-vectors into this format. You could also modify the read_point_file function to read your own data format, or trivially modify convert.py to convert a .npy to this format.

  1. make (if not already compiled)
  2. Run dist/cover_tree <path to config.json> <port number to use for server>

The server responds to queries of the form:

<url of server>:<port>/?filename=<filename of feature>&limit=<number results to return>&level=19&region=<dataset name>

Requirements

  1. C++14 compiler
  2. OpenMP
  3. Optional: torchfile to use convert.py

Libraries used

covertree's People

Contributors

aman-tiwari avatar manzilzaheer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.