Python3 Implementation of the WireWalk Algorithm
Project description
wirewalk
Install
pip install wirewalk
Prerequisites
You will need
- Python3
- Networkx
- Numpy
- Gensim
- editdistance
I highly recommend installing an Anaconda environment. Future versions of WireWalk will be available on PyPI and conda.
How to use
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wirewalk-0.0.2.tar.gz
(10.1 kB
view details)
Built Distribution
File details
Details for the file wirewalk-0.0.2.tar.gz
.
File metadata
- Download URL: wirewalk-0.0.2.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d5c7d201556f57c03d37c54fdc9cf839ba6f783e2e5451450aecfb7248d30b8 |
|
MD5 | 9cd36625ce4a751cfd518716f9cc5d65 |
|
BLAKE2b-256 | db896d6f4f5856b55b46dc20b6bf9817403faa43c02143aa3c5ac9100b58d4e4 |
File details
Details for the file wirewalk-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: wirewalk-0.0.2-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 879919a54b48f13e9ee95c7271e02616ec21b1dd3d606948583564198dca34c6 |
|
MD5 | ef01e99c89a2223377e785922cb1671b |
|
BLAKE2b-256 | ea60fcdebb15e2a7fdaa0552fe8e31bbb315078b537eea27010ea5be89dbbde0 |