{"id":19141667,"url":"https://github.com/ricky9667/apriori-practice","last_synced_at":"2026-04-29T19:34:03.191Z","repository":{"id":46094168,"uuid":"427682828","full_name":"ricky9667/apriori-practice","owner":"ricky9667","description":"Apriori algorithm practice.","archived":false,"fork":false,"pushed_at":"2021-11-15T07:13:58.000Z","size":28,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T09:40:15.586Z","etag":null,"topics":["apriori-algorithm","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ricky9667.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-13T14:10:18.000Z","updated_at":"2021-11-15T07:14:01.000Z","dependencies_parsed_at":"2022-08-22T11:40:28.858Z","dependency_job_id":null,"html_url":"https://github.com/ricky9667/apriori-practice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ricky9667/apriori-practice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricky9667%2Fapriori-practice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricky9667%2Fapriori-practice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricky9667%2Fapriori-practice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricky9667%2Fapriori-practice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricky9667","download_url":"https://codeload.github.com/ricky9667/apriori-practice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricky9667%2Fapriori-practice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32441243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apriori-algorithm","python"],"created_at":"2024-11-09T07:24:18.933Z","updated_at":"2026-04-29T19:34:03.169Z","avatar_url":"https://github.com/ricky9667.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apriori Practice\n\nPractice Apriori algorithm and test with some datasets.\n\n## How to run\n\n### Get Python\n\nThis algorithm requires Python, first you have to install [here](https://www.python.org/downloads/) for Windows or run the following command for Linux/macOS:\n\n```shell=\n# macOS\nbrew install python3\n\n# Linux\napt install python3\n```\n\n\u003e Note: macOS is required to install [Homebrew](https://brew.sh) before running the command above\n\n### Run Apriori with raw Python sets\n\nYou can add datasets written in Python, the dataset should be a Python list `[]` with sets contains inside.\nFor example:\n\n```python=\ndataset1 = [{1, 3, 4},\n            {2, 3, 5},\n            {1, 2, 3, 5},\n            {2, 5}]\n```\n\n\u003e You can check out more examples in `./datasets/sample.py`\n\nNext, try Apriori by running the following code:\n\n```python=\nfrom src.apriori import find_frequent_itemsets\nfrom datasets.sample import dataset1, dataset2, dataset3, dataset4\n\n\ndef main():\n    print(\"dataset1 = \" + str(dataset1))\n    frequent_itemsets = find_frequent_itemsets(dataset=dataset1, min_support=2)\n    for frequent_itemset in frequent_itemsets:\n        print(frequent_itemset)\n\n\nif __name__ == '__main__':\n    main()\n```\n\n### Run Apriori by importing datasets from CSV file\n\nYou can import datasets from csv files, you can check out the sample csv file `./datasets/my_movies.csv`.\n\nYou should import the converter that converts the csv file to raw dataset like the following code:\n\n```python=\nfrom src.apriori import find_frequent_itemsets\nfrom src.converter import generate_dataset_from_csv\n\n\ndef main():\n    dataset = generate_dataset_from_csv('datasets/my_movies.csv')\n    frequent_itemsets = find_frequent_itemsets(dataset=dataset, min_support=2)\n    for frequent_itemset in frequent_itemsets:\n        print(frequent_itemset)\n\n\nif __name__ == '__main__':\n    main()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricky9667%2Fapriori-practice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricky9667%2Fapriori-practice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricky9667%2Fapriori-practice/lists"}