{ "info": { "author": "Qingying Chen", "author_email": "qychen.pku@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "#
gSpan
\n\n##### For Chinese readme, please go to [README-Chinese](https://github.com/betterenvi/gSpan/blob/master/README-Chinese.md). \n\n**gSpan** is an algorithm for mining frequent subgraphs.\n\nThis program implements gSpan with Python. The repository on GitHub is [https://github.com/betterenvi/gSpan](https://github.com/betterenvi/gSpan). This implementation borrows some ideas from [gboost](http://www.nowozin.net/sebastian/gboost/).\n\n### Undirected Graphs\nThis program supports undirected graphs, and produces same results with gboost on the dataset [graphdata/graph.data](https://github.com/betterenvi/gSpan/blob/master/graphdata/graph.data). \n\n### Directed Graphs\nSo far(date: 2016-10-29), gboost does not support directed graphs. This program implements gSpan for directed graphs. More specific, this program can mine frequent directed subgraph that has at least one node that can reach other nodes in the subgraph. But correctness is not guaranteed since the author did not do enough testing. After running several times on datasets [graphdata/graph.data.directed.1](https://github.com/betterenvi/gSpan/blob/master/graphdata/graph.data.directed.1) and [graph.data.simple.5](https://github.com/betterenvi/gSpan/blob/master/graphdata/graph.data.simple.5), there is no fault.\n\n### How to install\n\nThis program supports both **Python 2** and **Python 3**.\n\n##### Method 1\n\nInstall this project using pip:\n```sh\npip install gspan-mining\n```\n\n##### Method 2\n\nFirst, clone the project:\n\n```sh\ngit clone https://github.com/betterenvi/gSpan.git\ncd gSpan\n```\n\nYou can ***optionally*** install this project as a third-party library so that you can run it under ***any*** path.\n\n```sh\npython setup.py install\n```\n\n### How to run\n\nThe command is:\n\n```sh\npython -m gspan_mining [-s min_support] [-n num_graph] [-l min_num_vertices] [-u max_num_vertices] [-d True/False] [-v True/False] [-p True/False] [-w True/False] [-h] database_file_name \n```\n\n\n##### Some examples\n\n- Read graph data from ./graphdata/graph.data, and mine undirected subgraphs given min support is 5000\n```\npython -m gspan_mining -s 5000 ./graphdata/graph.data\n```\n\n- Read graph data from ./graphdata/graph.data, mine undirected subgraphs given min support is 5000, and visualize these frequent subgraphs(matplotlib and networkx are required)\n```\npython -m gspan_mining -s 5000 -p True ./graphdata/graph.data\n```\n\n- Read graph data from ./graphdata/graph.data, and mine directed subgraphs given min support is 5000\n```\npython -m gspan_mining -s 5000 -d True ./graphdata/graph.data\n```\n\n- Print help info\n```\npython -m gspan_mining -h\n```\n\nThe author also wrote [example code](https://github.com/betterenvi/gSpan/blob/master/main.ipynb) using Jupyter Notebook. Mining results and visualizations are presented. For detail, please refer to [main.ipynb](https://github.com/betterenvi/gSpan/blob/master/main.ipynb).\n\n### Running time\n\n- Environment\n + OS: Windows 10\n + Python version: Python 2.7.12\n + Processor: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz 3.60 GHz\n + Ram: 8.00 GB\n\n\n- Running time\nOn the dataset [./graphdata/graph.data](https://github.com/betterenvi/gSpan/blob/master/graphdata/graph.data), running time is listed below:\n\n\n| Min support | Number of frequent subgraphs | Time |\n| --- | --- | --- |\n| 5000 | 26 | 51.48 s |\n| 3000 | 52 | 69.07 s |\n| 1000 | 455 | 3 m 49 s |\n| 600 | 1235 | 7 m 29 s |\n| 400 | 2710 | 12 m 53 s |\n\n\n\n### Reference\n- [Paper](http://www.cs.ucsb.edu/~xyan/papers/gSpan-short.pdf)\n\ngSpan: Graph-Based Substructure Pattern Mining, by X. Yan and J. Han. \nProc. 2002 of Int. Conf. on Data Mining (ICDM'02). \n\n- [gboost](http://www.nowozin.net/sebastian/gboost/)\n\nOne C++ implementation of gSpan.\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/betterenvi/gSpan", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "gspan-mining", "package_url": "https://pypi.org/project/gspan-mining/", "platform": "", "project_url": "https://pypi.org/project/gspan-mining/", "project_urls": { "Homepage": "https://github.com/betterenvi/gSpan" }, "release_url": "https://pypi.org/project/gspan-mining/0.2.2/", "requires_dist": null, "requires_python": "", "summary": "Implementation of frequent subgraph mining algorithm gSpan", "version": "0.2.2" }, "last_serial": 4038532, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "e54b3321fc067a8943283171206c4392", "sha256": "944bda7420d586646ec6df0a31dc6ddf952f92e3e3e654eb33aceebea24269f2" }, "downloads": -1, "filename": "gspan_mining-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e54b3321fc067a8943283171206c4392", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10630, "upload_time": "2018-07-07T06:08:21", "url": "https://files.pythonhosted.org/packages/67/49/963a75dc757826a234c3c5dd1b6b47a43f1a4e2fbe4285a7e9a887a48b5c/gspan_mining-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "781b21e251a35b7f2aa81598ce00c580", "sha256": "80a7e83bd04253c1aa19e7615313619ebf682597c5f03e8258df8d58e1ee6ab2" }, "downloads": -1, "filename": "gspan_mining-0.2.0.tar.gz", "has_sig": false, "md5_digest": "781b21e251a35b7f2aa81598ce00c580", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9005, "upload_time": "2018-07-07T06:08:23", "url": "https://files.pythonhosted.org/packages/32/71/01977fe067c548977e6703b1c41dbba4c40179ed22c5e24a1e4598ffbee9/gspan_mining-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "02ebe202b21c7f9667518cabef832cc2", "sha256": "0acd259ec2b2b3a86e67b9647c07853476e0320d3bfbc20e1dd27922f88552f2" }, "downloads": -1, "filename": "gspan_mining-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "02ebe202b21c7f9667518cabef832cc2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10655, "upload_time": "2018-07-07T06:24:41", "url": "https://files.pythonhosted.org/packages/1a/96/07582cf49f3444887461077af36c565c419b371a0a043c6ea7c028392630/gspan_mining-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "014bd1378c59218d2fea9b3bed8bf3fd", "sha256": "8de582178b7ff0db8c534b3f0c68287eab5ad2196729c289c1a39667a7c24fa4" }, "downloads": -1, "filename": "gspan_mining-0.2.1.tar.gz", "has_sig": false, "md5_digest": "014bd1378c59218d2fea9b3bed8bf3fd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9059, "upload_time": "2018-07-07T06:24:43", "url": "https://files.pythonhosted.org/packages/b8/d7/c71487c6691c084a12036a4a8171a9ea4c245ea5ede58e129f710e344bee/gspan_mining-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "c7079cb4bff59d8492fbab69bb92915b", "sha256": "d40bac5b6a0e648cc5edde476b61c7425a3f918657b41fe31ecb14dfc2067b4e" }, "downloads": -1, "filename": "gspan_mining-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c7079cb4bff59d8492fbab69bb92915b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10651, "upload_time": "2018-07-07T06:37:53", "url": "https://files.pythonhosted.org/packages/bf/df/ddd37de9246efafddcdac5c00b84613c67f97b8133ceb7619369245f6ebe/gspan_mining-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fc2849e39ee909793265b77d789d3aa2", "sha256": "3a8149b895dbc4d152935b34e6fb295280f491377ead8f09a9cf2afdd02e85a9" }, "downloads": -1, "filename": "gspan_mining-0.2.2.tar.gz", "has_sig": false, "md5_digest": "fc2849e39ee909793265b77d789d3aa2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9049, "upload_time": "2018-07-07T06:37:56", "url": "https://files.pythonhosted.org/packages/5c/03/53e8c13d1765dc8331572a8e62eb5196ac6d04401e2583dd7975edc035ed/gspan_mining-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c7079cb4bff59d8492fbab69bb92915b", "sha256": "d40bac5b6a0e648cc5edde476b61c7425a3f918657b41fe31ecb14dfc2067b4e" }, "downloads": -1, "filename": "gspan_mining-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c7079cb4bff59d8492fbab69bb92915b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10651, "upload_time": "2018-07-07T06:37:53", "url": "https://files.pythonhosted.org/packages/bf/df/ddd37de9246efafddcdac5c00b84613c67f97b8133ceb7619369245f6ebe/gspan_mining-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fc2849e39ee909793265b77d789d3aa2", "sha256": "3a8149b895dbc4d152935b34e6fb295280f491377ead8f09a9cf2afdd02e85a9" }, "downloads": -1, "filename": "gspan_mining-0.2.2.tar.gz", "has_sig": false, "md5_digest": "fc2849e39ee909793265b77d789d3aa2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9049, "upload_time": "2018-07-07T06:37:56", "url": "https://files.pythonhosted.org/packages/5c/03/53e8c13d1765dc8331572a8e62eb5196ac6d04401e2583dd7975edc035ed/gspan_mining-0.2.2.tar.gz" } ] }