{ "info": { "author": "Alexandre Wilmet", "author_email": "wilmet.alex@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "Operating System :: Unix", "Programming Language :: Python" ], "description": "# LogDiv: A Python Module for Computing Diversity in Transaction Logs\n\nLogDiv is a Python module for the computation of the diversity of items requested by users in transaction logs.\n\nIt takes two inputs:\n\n1) A log file with transactions.\n2) A file with item atributes.\n\nComputing the diversity of items requested by users is a task of interest in many fields, such as sociology, recommender systems, e-commerce, and media studies. Check the example below.\n\n## Getting Started\n\n### Prerequisites\n\nLogDiv requires:\n\n* Python\n* Numpy - Essential\n* Pandas - Essential\n* Matplotlib - Essential\n* pyyaml - Essential\n* scikit-learn - Essential\n* tqdm - Optional: progression bar, only one function requires it\n* Graph-tool - Optional: only one function requires it\n\n\n```shell\n$ python3 -m pip install numpy\n$ python3 -m pip install panda\n$ python3 -m pip install matplotlib \n$ python3 -m pip install pyyaml\n$ python3 -m pip install scikit-learn\n$ python3 -m pip install tqdm \n```\n\nInstalling Graph-tool is more complicated: https://git.skewed.de/count0/graph-tool/wikis/installation-instructions\n\n### Installing\n\nTo install LogDiv, you need to execute:\n\n```shell\n$ pip install logdiv\n```\n\n## Specification\n\n### Inputs format\n\nLogDiv needs a specific format of inputs to run:\n\n- A file describing all requests under a table format, whose fields are:\n* user ID\n* timestamp\n* requested item ID\n* referrer item ID\n\n- A file describing all pages visited under a table format, whose fields are:\n* item ID\n* classification 1 \n* classification 2\n* ...\n\n### YAML file\n\nCodes that use LogDiv are directed by a YAML file: if you want to modify input files, or the features you want to compute, \nyou just need to modify the YAML file, not the code itself.\n\nYAML file are similar to JSON file, once you load them, they take the form of a dictionnary. In your codes, you have for instance \na function that take a parameter that need to be changed often. You can give to your function the key of the dictionnary, and then \nchange the value in the YAML file. This allows to make less mistakes and take less time when you want to change parameters in your code.\n\n### Documentation\n\nIf you want precision on a function of LogDiv: \n* what is the purpose of the function\n* what these functions take in input\n* what they return\n\nyou need to run in a Console Python:\n```python\n>>> help(function)\n```\n\n## Examples\n\nYou dispose of two examples to familiarize yourself with LogDiv:\n* Example 1 uses a short dataset to show how to use LogDiv\n* Example 2 uses a dataset of more than 100 thousands of requests to show what kind of results can be obtained\n\nThese examples (dataset, script and yaml file) can be found in *datasets* directory. These YAML files are self-explanatory.\n\n### Example 1\nThe following example illustrates the inputs format of the package.\n\n![](example.png)\n\n|user |timestamp |requested_item| referrer_item|\n|-----|-------------------|--------------|-------------|\n|user1|2019-07-03 00:00:00|v1 |v4 |\n|user1|2019-07-03 00:01:00|v4 |v2 |\n|user1|2019-07-03 00:01:10|v4 |v6 |\n|user1|2019-07-03 00:01:20|v4 |v6 |\n|user1|2019-07-03 00:02:00|v6 |v9 |\n|user1|2019-07-03 03:00:00|v8 |v10 |\n|user1|2019-07-03 03:01:00|v8 |v5 |\n|user2|2019-07-05 12:00:00|v3 |v5 |\n|user2|2019-07-05 12:00:30|v5 |v7 |\n|user2|2019-07-05 12:00:45|v7 |v9 |\n|user2|2019-07-05 12:01:00|v9 |v6 |\n|user3|2019-07-05 18:00:00|v10 |v5 |\n|user3|2019-07-05 18:01:15|v10 |v7 |\n|user3|2019-07-05 18:03:35|v10 |v9 |\n|user3|2019-07-05 18:06:00|v7 |v4 |\n|user3|2019-07-05 18:07:22|v5 |v2 |\n\n|item|class1 |class2 |class3 |\n|----|--------|--------|-------|\n|v1 |x |\\alpha |h |\n|v2 |y |\\beta |h |\n|v3 |y |\\beta |f |\n|v4 |x |\\beta |h |\n|v5 |z |\\gammma |f |\n|v6 |y |\\alpha |h |\n|v7 |z |\\alpha |f |\n|v8 |x |\\gammma |f |\n|v9 |y |\\alpha |f |\n|v10 |z |\\gammma |h |\n\nIf you want to run example 1, you need to be in the directory datasets/example1, and run:\n```shell\n$ python3 example_1.py\n```\n\n### Example 2\n\n![](example_2.png)\n\nThis figure is the Gephi graph of dataset 2, where each color correspond to a different media.\n\nThe file describing requests has the same structure than the one in example 1.\n\nThe file describing pages is more concrete than the one in example 1:\n\n|item |media |continent |\n|-------|--------|-------------|\n|item0 |Politics|Europe |\n|item1 |Health |Asia |\n|item2 |Politics|North America|\n\nIf you want to run example 2, you need to be in the directory datasets/example2, and run:\n```shell\n$ python3 example_2.py\n```\n\n\n\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/pedroramaciotti/diversity-patterns", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "logdiv", "package_url": "https://pypi.org/project/logdiv/", "platform": "", "project_url": "https://pypi.org/project/logdiv/", "project_urls": { "Homepage": "https://github.com/pedroramaciotti/diversity-patterns" }, "release_url": "https://pypi.org/project/logdiv/0.0.2.7/", "requires_dist": null, "requires_python": "", "summary": "A package to mesure diversity of log files", "version": "0.0.2.7" }, "last_serial": 5588805, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b021ead1a9abee55ffc34834c6884b2a", "sha256": "e6131b5bea82b4c8e4a41d09ceed4fdb3b58bc40c10ede6aff7e7464188bb9c9" }, "downloads": -1, "filename": "logdiv-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b021ead1a9abee55ffc34834c6884b2a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 35933, "upload_time": "2019-07-12T09:28:38", "url": "https://files.pythonhosted.org/packages/ee/f2/dc73c2de368fbef3499fa6c98dab520823f8a595193ae17542ecc5a1f911/logdiv-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "114a97487cba0e85e14a3fe1b299131e", "sha256": "616657e3ee61f29ba49a0a9d8d6f391148ee762f4c5b13ab18e325e8e53ea188" }, "downloads": -1, "filename": "logdiv-0.0.1.tar.gz", "has_sig": false, "md5_digest": "114a97487cba0e85e14a3fe1b299131e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22986, "upload_time": "2019-07-12T09:28:41", "url": "https://files.pythonhosted.org/packages/8d/36/592fe51d25e932dcaac7c652f5bf5584095c687c5e98d6a648939128a3c9/logdiv-0.0.1.tar.gz" } ], "0.0.2.1": [ { "comment_text": "", "digests": { "md5": "f870c8dee374fa8a4526911ebee02e7a", "sha256": "9b51590b249f026fa50ef875dbb0e7a18cbda367c1d2f7b886fb8a019903b5af" }, "downloads": -1, "filename": "logdiv-0.0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f870c8dee374fa8a4526911ebee02e7a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 36405, "upload_time": "2019-07-16T12:32:49", "url": "https://files.pythonhosted.org/packages/c9/fa/1b92e72657b516b9afaed19575b2c52edb58671206fe711f12d4faebdfc4/logdiv-0.0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d2e173ee53fdd457ee3c0b8b80c7cb5c", "sha256": "68b93cf38177185a4de641bfbbb572395c98d68fda2ff99534369f6fa6de76d7" }, "downloads": -1, "filename": "logdiv-0.0.2.1.tar.gz", "has_sig": false, "md5_digest": "d2e173ee53fdd457ee3c0b8b80c7cb5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23549, "upload_time": "2019-07-16T12:32:51", "url": "https://files.pythonhosted.org/packages/68/d9/8e9850e7a52ec07f8e0e5417217a1818373b8e97e0fb7ee904c2d81cf963/logdiv-0.0.2.1.tar.gz" } ], "0.0.2.2": [ { "comment_text": "", "digests": { "md5": "1ab9dbd6c77207ac5b856bb3950ece3d", "sha256": "916293fe9def749fa0320dbe97810315231e7602974f17b49ad1eb56ac9ee550" }, "downloads": -1, "filename": "logdiv-0.0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "1ab9dbd6c77207ac5b856bb3950ece3d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 38498, "upload_time": "2019-07-25T09:19:19", "url": "https://files.pythonhosted.org/packages/7a/8f/cc3cb267285e1ede631319b8bd4758b31db9a3fd0c193c643971c9d0dc96/logdiv-0.0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f82ef57071dd3fbe047e13e16511f50a", "sha256": "c13cc874840310d1c3b56b242a2c647b8be413101ddedc9f192468b02514dadd" }, "downloads": -1, "filename": "logdiv-0.0.2.2.tar.gz", "has_sig": false, "md5_digest": "f82ef57071dd3fbe047e13e16511f50a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24293, "upload_time": "2019-07-25T09:19:21", "url": "https://files.pythonhosted.org/packages/fa/1d/d222251ca8883b879c004d0009fa4fcdc1cf0a7ee7a814b39eae6dab8956/logdiv-0.0.2.2.tar.gz" } ], "0.0.2.3": [ { "comment_text": "", "digests": { "md5": "f5b82ffe7f29b40ec4e94510db3c28cc", "sha256": "74de87d67ec6ef0b588389ab7142b6ad4b088fc32ef28b75f786c4ba210d3800" }, "downloads": -1, "filename": "logdiv-0.0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "f5b82ffe7f29b40ec4e94510db3c28cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 38505, "upload_time": "2019-07-25T09:23:30", "url": "https://files.pythonhosted.org/packages/c1/ea/0070c7bb527b3b2f32bd3cdd0ba6c576c636c03db0814b2e7286ab8457e5/logdiv-0.0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c222c2f0b64c1ce4d8b24c902566543", "sha256": "1709697f80df60034b969f98fbf456e7f138e75cc4006f6d67a6dbb9dd1e0fb5" }, "downloads": -1, "filename": "logdiv-0.0.2.3.tar.gz", "has_sig": false, "md5_digest": "6c222c2f0b64c1ce4d8b24c902566543", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24289, "upload_time": "2019-07-25T09:23:32", "url": "https://files.pythonhosted.org/packages/4f/3e/349d06676fbb30ebef069efd626547987ae4f8dea7c3fe072c1fe043291a/logdiv-0.0.2.3.tar.gz" } ], "0.0.2.4": [ { "comment_text": "", "digests": { "md5": "0e3ca0fa76e9a9064d0b9c7f2fa71936", "sha256": "a86e2c0498100b8b83f30a4c2b5f9e0a69a708e8d3174e4dc08232a000b7a2c0" }, "downloads": -1, "filename": "logdiv-0.0.2.4-py3-none-any.whl", "has_sig": false, "md5_digest": "0e3ca0fa76e9a9064d0b9c7f2fa71936", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 38623, "upload_time": "2019-07-26T11:58:27", "url": "https://files.pythonhosted.org/packages/a6/03/2de1919e8d215a79a1957918c28f399de04e52b4228adbe0c549107dafa8/logdiv-0.0.2.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "744931cd23bd6e19810aaca1c579fe78", "sha256": "403c98a7044f346a6b1e24ece69c41d578b1ea24a4c7004ddeb25641667fbc9c" }, "downloads": -1, "filename": "logdiv-0.0.2.4.tar.gz", "has_sig": false, "md5_digest": "744931cd23bd6e19810aaca1c579fe78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24586, "upload_time": "2019-07-26T11:58:28", "url": "https://files.pythonhosted.org/packages/48/b8/a97bd0aafe0c959ab5e729b18213bf0ff9b9037777e8a6d7b4702a9063a3/logdiv-0.0.2.4.tar.gz" } ], "0.0.2.5": [ { "comment_text": "", "digests": { "md5": "5242d98d3cafb60023cb2b25fc32a5d6", "sha256": "ccfb8621b9f3ed9a06d122f9781aa6cb035d56350ff7fb39f669044b21bed8ee" }, "downloads": -1, "filename": "logdiv-0.0.2.5-py3-none-any.whl", "has_sig": false, "md5_digest": "5242d98d3cafb60023cb2b25fc32a5d6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 38627, "upload_time": "2019-07-26T12:00:45", "url": "https://files.pythonhosted.org/packages/9d/59/24585da524172fa217e1945e94236b7840f7f204eba712d9fd998747f6a9/logdiv-0.0.2.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "720e4fcdfb80b40d54bdb40742936515", "sha256": "9d23ef394df27f6675d7cc055702b94e6338e4d8e92bc5c3c270531d0d00aead" }, "downloads": -1, "filename": "logdiv-0.0.2.5.tar.gz", "has_sig": false, "md5_digest": "720e4fcdfb80b40d54bdb40742936515", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24590, "upload_time": "2019-07-26T12:00:46", "url": "https://files.pythonhosted.org/packages/dd/a9/70620ea1e3ed364a52a5de83c1f5fcf3791ebc4fa22edacec46613696b89/logdiv-0.0.2.5.tar.gz" } ], "0.0.2.6": [ { "comment_text": "", "digests": { "md5": "0c5b55a0ba1ace4c89c2b05db05e42a4", "sha256": "662ea3059b1d63e68fc5e40b854492f41dfcb4096c02e6e06ecb08597e65e742" }, "downloads": -1, "filename": "logdiv-0.0.2.6-py3-none-any.whl", "has_sig": false, "md5_digest": "0c5b55a0ba1ace4c89c2b05db05e42a4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 70591, "upload_time": "2019-07-26T12:15:53", "url": "https://files.pythonhosted.org/packages/f0/55/ace0ca9bc0ab453d42a268b4818b671764fa3f6ed9e7e5b267744eb6c8eb/logdiv-0.0.2.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "262d6e2ccd177051ba424054480faebc", "sha256": "f8440a51f2dc8f5be5f3e0456d79a1e2b8e821e64f4b362f113f57f833b3a632" }, "downloads": -1, "filename": "logdiv-0.0.2.6.tar.gz", "has_sig": false, "md5_digest": "262d6e2ccd177051ba424054480faebc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25919, "upload_time": "2019-07-26T12:15:54", "url": "https://files.pythonhosted.org/packages/85/27/4227948c51dd664d6e849669b5fbc4a2afb8d0e74ed54eff731c688e128d/logdiv-0.0.2.6.tar.gz" } ], "0.0.2.7": [ { "comment_text": "", "digests": { "md5": "a8dfb55a2abb6ae1484a5dfb5171294b", "sha256": "c74387f0e2366f4e12fc326b8dc677b34276b7654e6bb6efe340b2c62c483491" }, "downloads": -1, "filename": "logdiv-0.0.2.7-py3-none-any.whl", "has_sig": false, "md5_digest": "a8dfb55a2abb6ae1484a5dfb5171294b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 70472, "upload_time": "2019-07-26T12:23:39", "url": "https://files.pythonhosted.org/packages/95/b5/6f9df502df37718cc370d06b3b44db63595018da255c57e4b249dd76e253/logdiv-0.0.2.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "26dd4a230e34f4b3d215950e646337b3", "sha256": "ecd73d500e1d13be983fa344a663893b0ceb929adea9fa658c0a1bda900b0926" }, "downloads": -1, "filename": "logdiv-0.0.2.7.tar.gz", "has_sig": false, "md5_digest": "26dd4a230e34f4b3d215950e646337b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24536, "upload_time": "2019-07-26T12:23:41", "url": "https://files.pythonhosted.org/packages/7f/92/c628f4f0f5481d151a2274fadfab2eb0e821d734d68eb18d6e3acde8ce5b/logdiv-0.0.2.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a8dfb55a2abb6ae1484a5dfb5171294b", "sha256": "c74387f0e2366f4e12fc326b8dc677b34276b7654e6bb6efe340b2c62c483491" }, "downloads": -1, "filename": "logdiv-0.0.2.7-py3-none-any.whl", "has_sig": false, "md5_digest": "a8dfb55a2abb6ae1484a5dfb5171294b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 70472, "upload_time": "2019-07-26T12:23:39", "url": "https://files.pythonhosted.org/packages/95/b5/6f9df502df37718cc370d06b3b44db63595018da255c57e4b249dd76e253/logdiv-0.0.2.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "26dd4a230e34f4b3d215950e646337b3", "sha256": "ecd73d500e1d13be983fa344a663893b0ceb929adea9fa658c0a1bda900b0926" }, "downloads": -1, "filename": "logdiv-0.0.2.7.tar.gz", "has_sig": false, "md5_digest": "26dd4a230e34f4b3d215950e646337b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24536, "upload_time": "2019-07-26T12:23:41", "url": "https://files.pythonhosted.org/packages/7f/92/c628f4f0f5481d151a2274fadfab2eb0e821d734d68eb18d6e3acde8ce5b/logdiv-0.0.2.7.tar.gz" } ] }