Skip to main content

Python3 Implementation of the WireWalk Algorithm

Project description

wirewalk

References

Wire Before You Walk. T. Asmara, D. Bhaskar, I. Adelstein, S. Krishnaswamy, M. Perlmutter. In proceedings for Asilomar 2023.

Asilomar 2023 Proceedings

To reproduce the results, please see the instructions in the Asilomar_2023.py file.

Install

pip install wirewalk

Prerequisites

You will need

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


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.3.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

wirewalk-0.0.3-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file wirewalk-0.0.3.tar.gz.

File metadata

  • Download URL: wirewalk-0.0.3.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for wirewalk-0.0.3.tar.gz
Algorithm Hash digest
SHA256 850b020b637105b425c57cf359e4d144bdcc19879acb97576535beeeecb75afb
MD5 7ea9feab4ac46db251a50d7ddd91e32a
BLAKE2b-256 fbb7183883ff7b5f2de96a0f8bf140a11ac7f2cfb12e746993a867c1d1aa25f0

See more details on using hashes here.

File details

Details for the file wirewalk-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: wirewalk-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for wirewalk-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fd3baa52f3be0404ad210998edc879d6373334a6b4a45efc950c93549b7dc6a6
MD5 2c48cbaeecf9e2835ca84b45d3222a3e
BLAKE2b-256 e3e4cf6590742eac304177e59777e74d8468a0c49c5528964a0c1c76ddc3e651

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page