{ "info": { "author": "G\u00f6khan Gerdan", "author_email": "gokhang1327@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Aprioripy: Apriori algorithm.\n\n\n## Apriori algorithm usage:\n\n```python\nfrom apriopy import Apriopy\n\n\ntest_table = pd.DataFrame({\n \"items\": [\"1, 3, 4\", \"2, 3, 5\", \"1, 2, 3, 5\", \"2, 5\"]\n})\n\nprint(\"Test table\")\nprint(test_table)\n\nap = Aprioripy(table=test_table)\n\nprint(\"\\nFrequency table:\")\nprint(ap.frequency_table)\n\nap.apriori(min_support=0.5)\n\nfor i in ap.association_tables.keys():\n print(\"\\nAssociation table \" + i)\n print(ap.association_tables[i])\n\ntest_table = pd.DataFrame(\n [\n {\"1\": 1, \"2\": 0, \"3\": 1, \"4\": 1, \"5\": 0},\n {\"1\": 0, \"2\": 1, \"3\": 1, \"4\": 0, \"5\": 1},\n {\"1\": 1, \"2\": 1, \"3\": 1, \"4\": 0, \"5\": 1},\n {\"1\": 0, \"2\": 1, \"3\": 0, \"4\": 0, \"5\": 1}\n ]\n)\n\nprint(\"\\nTest table:\")\nprint(test_table)\n\nap = Aprioripy(table=test_table, convert=False)\n\nprint(\"\\nFrequency table:\")\nprint(ap.frequency_table)\n\nap.apriori(min_support=0.5)\n\nfor i in ap.association_tables.keys():\n print(\"\\nAssociation table \" + i)\n print(ap.association_tables[i])\n```\n## Output:\n\n```\nTest table\n items\n0 1, 3, 4\n1 2, 3, 5\n2 1, 2, 3, 5\n3 2, 5\n\nFrequency table:\n item frequency\n0 1 0.50\n1 2 0.75\n2 3 0.75\n3 4 0.25\n4 5 0.75\n\nAssociation table L1\n item frequency\n0 1 0.50\n1 2 0.75\n2 3 0.75\n4 5 0.75\n\nAssociation table L2\n itemset frequency\n1 (1, 3) 0.50\n4 (2, 3) 0.50\n6 (2, 5) 0.75\n8 (3, 5) 0.50\n\nAssociation table L3\n itemset frequency\n7 (2, 3, 5) 0.5\n\nTest table:\n 1 2 3 4 5\n0 1 0 1 1 0\n1 0 1 1 0 1\n2 1 1 1 0 1\n3 0 1 0 0 1\n\nFrequency table:\n item frequency\n0 1 0.50\n1 2 0.75\n2 3 0.75\n3 4 0.25\n4 5 0.75\n\nAssociation table L1\n item frequency\n0 1 0.50\n1 2 0.75\n2 3 0.75\n4 5 0.75\n\nAssociation table L2\n itemset frequency\n1 (1, 3) 0.50\n4 (2, 3) 0.50\n6 (2, 5) 0.75\n8 (3, 5) 0.50\n\nAssociation table L3\n itemset frequency\n7 (2, 3, 5) 0.5\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/gokhangerdan/Aprioripy", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "aprioripy", "package_url": "https://pypi.org/project/aprioripy/", "platform": "", "project_url": "https://pypi.org/project/aprioripy/", "project_urls": { "Homepage": "https://github.com/gokhangerdan/Aprioripy" }, "release_url": "https://pypi.org/project/aprioripy/0.0.2/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Apriori algorithm.", "version": "0.0.2" }, "last_serial": 5824161, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "d0de76adb280764366c4ff6518ac2807", "sha256": "2d6078103dbb404e258513dcf5a5784671d23c6a5dec4a128f472f46840cf68e" }, "downloads": -1, "filename": "aprioripy-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d0de76adb280764366c4ff6518ac2807", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 3650, "upload_time": "2019-09-13T06:50:25", "url": "https://files.pythonhosted.org/packages/cb/d9/7ff71b33b94262f19d6b43321b9135c33b3ff2aa77ebf958d24f28c064a9/aprioripy-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50f6c689b1baebc6ec18d7549f14113b", "sha256": "f14bcc0e9ef1d31b81cd55062057789754833d36f887ef9bf2151791a503980c" }, "downloads": -1, "filename": "aprioripy-0.0.2.tar.gz", "has_sig": false, "md5_digest": "50f6c689b1baebc6ec18d7549f14113b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 2561, "upload_time": "2019-09-13T06:50:27", "url": "https://files.pythonhosted.org/packages/d5/53/a0e9c036278a972e139e685a643a7f0bf6e97001c3519dbfa008c9191664/aprioripy-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d0de76adb280764366c4ff6518ac2807", "sha256": "2d6078103dbb404e258513dcf5a5784671d23c6a5dec4a128f472f46840cf68e" }, "downloads": -1, "filename": "aprioripy-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d0de76adb280764366c4ff6518ac2807", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 3650, "upload_time": "2019-09-13T06:50:25", "url": "https://files.pythonhosted.org/packages/cb/d9/7ff71b33b94262f19d6b43321b9135c33b3ff2aa77ebf958d24f28c064a9/aprioripy-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50f6c689b1baebc6ec18d7549f14113b", "sha256": "f14bcc0e9ef1d31b81cd55062057789754833d36f887ef9bf2151791a503980c" }, "downloads": -1, "filename": "aprioripy-0.0.2.tar.gz", "has_sig": false, "md5_digest": "50f6c689b1baebc6ec18d7549f14113b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 2561, "upload_time": "2019-09-13T06:50:27", "url": "https://files.pythonhosted.org/packages/d5/53/a0e9c036278a972e139e685a643a7f0bf6e97001c3519dbfa008c9191664/aprioripy-0.0.2.tar.gz" } ] }