{ "info": { "author": "Maarten Grootendorst", "author_email": "maartengrootendorst@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# Vectors of Locally Aggregated Concepts (VLAC)\n\n[![PyPI - Status](https://img.shields.io/badge/status-beta-yellow.svg)]()\n[![PyPI - Python](https://img.shields.io/badge/python-3.4%20%7C%203.5%20%7C%203.6-blue.svg)]()\n[![PyPI - Python](https://img.shields.io/badge/license-MIT-green.svg)]()\n\n\n## Purpose\nAs illustrated in the Figure below, VLAC clusters word embeddings to create *k* concepts. Due to the high dimensionality of word embeddings (i.e., 300) spherical k-means is used to perform the clustering as applying euclidean distance will result in little difference in the distances between samples. The method works as follows. Let *wi* be a word embedding of size *D* assigned to cluster center *ck*. Then, for each word in a document, VLAC computes the element-wise sum of residuals of each word embedding to its assigned cluster center. This results in *k* feature vectors, one for each concept, and all of size *D*. All feature vectors are then concatenated, power normalized, and finally, l2 normalization is applied. For example, if 10 concepts were to be created out of word embeddings of size 300 then the resulting document vector would contain 10 x 300 values. \n\n\n\n## Usage\nTested in python 3.5.4. \n\n```python\n# Train model and transform collection of documents\nvlac_model = VLAC(documents=train_docs, model=model, oov=False)\nvlac_features, kmeans = vlac_model.fit_transform(num_concepts=30)\n\n# Create features new documents\nvlac_model = VLAC(documents=train_docs, model=model, oov=False)\ntest_features = vlac_model.transform(kmeans=kmeans)\n```\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MaartenGr/VLAC", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "Vectors-of-Locally-Aggregate-Concepts", "package_url": "https://pypi.org/project/Vectors-of-Locally-Aggregate-Concepts/", "platform": "", "project_url": "https://pypi.org/project/Vectors-of-Locally-Aggregate-Concepts/", "project_urls": { "Homepage": "https://github.com/MaartenGr/VLAC" }, "release_url": "https://pypi.org/project/Vectors-of-Locally-Aggregate-Concepts/0.1/", "requires_dist": [ "numpy", "sklearn" ], "requires_python": "", "summary": "Tool for creating document features", "version": "0.1" }, "last_serial": 5331554, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b2b69d124be33ece45ec4187c90e28dd", "sha256": "8d86a9229135a8f3394a284b8acaf1cdc2a60de9262177f118656aa8069a698b" }, "downloads": -1, "filename": "Vectors_of_Locally_Aggregate_Concepts-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b2b69d124be33ece45ec4187c90e28dd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5362, "upload_time": "2019-05-29T10:03:31", "url": "https://files.pythonhosted.org/packages/85/3e/b7888528694ddd21dae631fd257b306c64825fc6d8bf9697daa4feec5f69/Vectors_of_Locally_Aggregate_Concepts-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fbd22c37b8cfe602b98cb8e8f06901e9", "sha256": "11ec6867b432497dbe42e4b2b79cd6e90929deffae34592fbbaffb2a9e6d8d5b" }, "downloads": -1, "filename": "Vectors of Locally Aggregate Concepts-0.1.tar.gz", "has_sig": false, "md5_digest": "fbd22c37b8cfe602b98cb8e8f06901e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3726, "upload_time": "2019-05-29T10:03:34", "url": "https://files.pythonhosted.org/packages/cf/e3/97582cb32c27e8a0563d5cc64b6f77c08322579faea1ef166197e7759279/Vectors%20of%20Locally%20Aggregate%20Concepts-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b2b69d124be33ece45ec4187c90e28dd", "sha256": "8d86a9229135a8f3394a284b8acaf1cdc2a60de9262177f118656aa8069a698b" }, "downloads": -1, "filename": "Vectors_of_Locally_Aggregate_Concepts-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b2b69d124be33ece45ec4187c90e28dd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5362, "upload_time": "2019-05-29T10:03:31", "url": "https://files.pythonhosted.org/packages/85/3e/b7888528694ddd21dae631fd257b306c64825fc6d8bf9697daa4feec5f69/Vectors_of_Locally_Aggregate_Concepts-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fbd22c37b8cfe602b98cb8e8f06901e9", "sha256": "11ec6867b432497dbe42e4b2b79cd6e90929deffae34592fbbaffb2a9e6d8d5b" }, "downloads": -1, "filename": "Vectors of Locally Aggregate Concepts-0.1.tar.gz", "has_sig": false, "md5_digest": "fbd22c37b8cfe602b98cb8e8f06901e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3726, "upload_time": "2019-05-29T10:03:34", "url": "https://files.pythonhosted.org/packages/cf/e3/97582cb32c27e8a0563d5cc64b6f77c08322579faea1ef166197e7759279/Vectors%20of%20Locally%20Aggregate%20Concepts-0.1.tar.gz" } ] }