{ "info": { "author": "Kay Zhu", "author_email": "me@kayzhu.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries" ], "description": "======\nLSHash\n======\n\n:Version: 0.0.4dev\n\nA fast Python implementation of locality sensitive hashing with persistance\nsupport.\n\nHighlights\n==========\n\n- Fast hash calculation for large amount of high dimensional data through the use of `numpy` arrays.\n- Built-in support for persistency through Redis.\n- Multiple hash indexes support.\n- Built-in support for common distance/objective functions for ranking outputs.\n\nInstallation\n============\n``LSHash`` depends on the following libraries:\n\n- numpy\n- redis (if persistency through Redis is needed)\n- bitarray (if hamming distance is used as distance function)\n\nTo install:\n\n.. code-block:: bash\n\n $ pip install lshash\n\nQuickstart\n==========\nTo create 6-bit hashes for input data of 8 dimensions:\n\n.. code-block:: python\n\n >>> from lshash import LSHash\n\n >>> lsh = LSHash(6, 8)\n >>> lsh.index([1,2,3,4,5,6,7,8])\n >>> lsh.index([2,3,4,5,6,7,8,9])\n >>> lsh.index([10,12,99,1,5,31,2,3])\n >>> lsh.query([1,2,3,4,5,6,7,7])\n [((1, 2, 3, 4, 5, 6, 7, 8), 1.0),\n ((2, 3, 4, 5, 6, 7, 8, 9), 11)]\n\n\nMain Interface\n==============\n\n- To initialize a ``LSHash`` instance:\n\n.. code-block:: python\n\n LSHash(hash_size, input_dim, num_of_hashtables=1, storage=None, matrices_filename=None, overwrite=False)\n\nparameters:\n\n``hash_size``:\n The length of the resulting binary hash.\n``input_dim``:\n The dimension of the input vector.\n``num_hashtables = 1``:\n (optional) The number of hash tables used for multiple lookups.\n``storage = None``:\n (optional) Specify the name of the storage to be used for the index\n storage. Options include \"redis\".\n``matrices_filename = None``:\n (optional) Specify the path to the .npz file random matrices are stored\n or to be stored if the file does not exist yet\n``overwrite = False``:\n (optional) Whether to overwrite the matrices file if it already exist\n\n- To index a data point of a given ``LSHash`` instance, e.g., ``lsh``:\n\n.. code-block:: python\n\n lsh.index(input_point, extra_data=None):\n\nparameters:\n\n``input_point``:\n The input data point is an array or tuple of numbers of input_dim.\n``extra_data = None``:\n (optional) Extra data to be added along with the input_point.\n\n- To query a data point against a given ``LSHash`` instance, e.g., ``lsh``:\n\n.. code-block:: python\n\n lsh.query(query_point, num_results=None, distance_func=\"euclidean\"):\n\nparameters:\n\n``query_point``:\n The query data point is an array or tuple of numbers of input_dim.\n``num_results = None``:\n (optional) The number of query results to return in ranked order. By\n default all results will be returned.\n``distance_func = \"euclidean\"``:\n (optional) Distance function to use to rank the candidates. By default\n euclidean distance function will be used.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://...", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "lshash3", "package_url": "https://pypi.org/project/lshash3/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/lshash3/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://..." }, "release_url": "https://pypi.org/project/lshash3/0.0.8/", "requires_dist": null, "requires_python": null, "summary": "A fast Python implementation of locality sensitive hashing with persistance (Redis) support.", "version": "0.0.8" }, "last_serial": 2833598, "releases": { "0.0.8": [ { "comment_text": "", "digests": { "md5": "f5a100db4eca21aa23abb995a3aeaa62", "sha256": "aec18362311a44c62a3440915fd26533f2d6fc3708bfd5063d4856390ae9d220" }, "downloads": -1, "filename": "lshash3-0.0.8.tar.gz", "has_sig": false, "md5_digest": "f5a100db4eca21aa23abb995a3aeaa62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9441, "upload_time": "2017-04-27T04:26:10", "url": "https://files.pythonhosted.org/packages/51/a7/825799ea4c52ff477aae56f08b172016c434cd0264cbdd9cd7d82895bfe4/lshash3-0.0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f5a100db4eca21aa23abb995a3aeaa62", "sha256": "aec18362311a44c62a3440915fd26533f2d6fc3708bfd5063d4856390ae9d220" }, "downloads": -1, "filename": "lshash3-0.0.8.tar.gz", "has_sig": false, "md5_digest": "f5a100db4eca21aa23abb995a3aeaa62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9441, "upload_time": "2017-04-27T04:26:10", "url": "https://files.pythonhosted.org/packages/51/a7/825799ea4c52ff477aae56f08b172016c434cd0264cbdd9cd7d82895bfe4/lshash3-0.0.8.tar.gz" } ] }