# wirewalk
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
# References
[Wire Before You Walk. T. Asmara, D. Bhaskar, I. Adelstein, S.
Krishnaswamy, M. Perlmutter. In proceedings for Asilomar
2023.](http://tesfaasmara.com/wirewalk.pdf)
# Asilomar 2023 Proceedings
To reproduce the results, please see the instructions in the
[Asilomar_2023.py](https://github.com/TesfaAsmara/wirewalk/blob/main/Asilomar_2023.py)
file.
## Install
``` sh
pip install wirewalk
```
### Prerequisites
You will need
- Python3
- [Networkx](https://networkx.org/documentation/stable/install.html)
- [Numpy](https://numpy.org/install/)
- [Gensim](https://pypi.org/project/gensim/)
- [editdistance](https://pypi.org/project/editdistance/)
I highly recommend installing an
[Anaconda](https://www.anaconda.com/distribution/#download-section)
environment. Future versions of WireWalk will be available on PyPI and
conda.
## How to use
``` python
import networkx as nx
from wirewalk.core import WireWalk, jaccard_coefficient, max_flow
# Create a graph
graph = nx.fast_gnp_random_graph(n=10, p=0.5)
# Instantiate a WireWalk object
wireWalk = WireWalk(graph, dimensions = 128, window = 10, walk_length = 80, num_walks = 10, workers = 1)
# Compute transition probabilities using jaccard coefficient transformation, generate walks, and embed nodes
model = wireWalk.fit(jaccard_coefficient)
# **MAX_FLOW and MIN_COST_MAX_FLOW ONLY WORK WITH GIVEN capacity**
# If weight exists, then
# nx.set_edge_attributes(graph, nx.get_edge_attributes(graph, "weight"), "capacity").
# Otherwise,
nx.set_edge_attributes(graph, 1, "capacity")
model = wireWalk.fit(max_flow)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/TesfaAsmara/wirewalk",
"name": "wirewalk",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "nbdev jupyter notebook python",
"author": "tesfaasmara",
"author_email": "57428343+TesfaAsmara@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/fb/b7/183883ff7b5f2de96a0f8bf140a11ac7f2cfb12e746993a867c1d1aa25f0/wirewalk-0.0.3.tar.gz",
"platform": null,
"description": "# wirewalk\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\n# References\n\n[Wire Before You Walk. T. Asmara, D. Bhaskar, I. Adelstein, S.\nKrishnaswamy, M. Perlmutter. In proceedings for Asilomar\n2023.](http://tesfaasmara.com/wirewalk.pdf)\n\n# Asilomar 2023 Proceedings\n\nTo reproduce the results, please see the instructions in the\n[Asilomar_2023.py](https://github.com/TesfaAsmara/wirewalk/blob/main/Asilomar_2023.py)\nfile.\n\n## Install\n\n``` sh\npip install wirewalk\n```\n\n### Prerequisites\n\nYou will need\n\n- Python3\n- [Networkx](https://networkx.org/documentation/stable/install.html)\n- [Numpy](https://numpy.org/install/)\n- [Gensim](https://pypi.org/project/gensim/)\n- [editdistance](https://pypi.org/project/editdistance/)\n\nI highly recommend installing an\n[Anaconda](https://www.anaconda.com/distribution/#download-section)\nenvironment. Future versions of WireWalk will be available on PyPI and\nconda.\n\n## How to use\n\n``` python\nimport networkx as nx\nfrom wirewalk.core import WireWalk, jaccard_coefficient, max_flow\n\n# Create a graph\ngraph = nx.fast_gnp_random_graph(n=10, p=0.5)\n\n# Instantiate a WireWalk object\nwireWalk = WireWalk(graph, dimensions = 128, window = 10, walk_length = 80, num_walks = 10, workers = 1)\n\n# Compute transition probabilities using jaccard coefficient transformation, generate walks, and embed nodes\nmodel = wireWalk.fit(jaccard_coefficient)\n\n# **MAX_FLOW and MIN_COST_MAX_FLOW ONLY WORK WITH GIVEN capacity**\n# If weight exists, then \n# nx.set_edge_attributes(graph, nx.get_edge_attributes(graph, \"weight\"), \"capacity\").\n# Otherwise,\nnx.set_edge_attributes(graph, 1, \"capacity\")\nmodel = wireWalk.fit(max_flow)\n```\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "Python3 Implementation of the WireWalk Algorithm",
"version": "0.0.3",
"project_urls": {
"Homepage": "https://github.com/TesfaAsmara/wirewalk"
},
"split_keywords": [
"nbdev",
"jupyter",
"notebook",
"python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e3e4cf6590742eac304177e59777e74d8468a0c49c5528964a0c1c76ddc3e651",
"md5": "2c48cbaeecf9e2835ca84b45d3222a3e",
"sha256": "fd3baa52f3be0404ad210998edc879d6373334a6b4a45efc950c93549b7dc6a6"
},
"downloads": -1,
"filename": "wirewalk-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2c48cbaeecf9e2835ca84b45d3222a3e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 9208,
"upload_time": "2023-05-31T22:43:46",
"upload_time_iso_8601": "2023-05-31T22:43:46.378595Z",
"url": "https://files.pythonhosted.org/packages/e3/e4/cf6590742eac304177e59777e74d8468a0c49c5528964a0c1c76ddc3e651/wirewalk-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fbb7183883ff7b5f2de96a0f8bf140a11ac7f2cfb12e746993a867c1d1aa25f0",
"md5": "7ea9feab4ac46db251a50d7ddd91e32a",
"sha256": "850b020b637105b425c57cf359e4d144bdcc19879acb97576535beeeecb75afb"
},
"downloads": -1,
"filename": "wirewalk-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "7ea9feab4ac46db251a50d7ddd91e32a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 10436,
"upload_time": "2023-05-31T22:43:48",
"upload_time_iso_8601": "2023-05-31T22:43:48.233273Z",
"url": "https://files.pythonhosted.org/packages/fb/b7/183883ff7b5f2de96a0f8bf140a11ac7f2cfb12e746993a867c1d1aa25f0/wirewalk-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-31 22:43:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "TesfaAsmara",
"github_project": "wirewalk",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "wirewalk"
}