Metadata-Version: 2.1
Name: wirewalk
Version: 0.0.2
Summary: Python3 Implementation of the WireWalk Algorithm
Home-page: https://github.com/TesfaAsmara/wirewalk
Author: tesfaasmara
Author-email: 57428343+TesfaAsmara@users.noreply.github.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: networkx
Requires-Dist: numpy
Requires-Dist: gensim
Requires-Dist: editdistance
Provides-Extra: dev

# wirewalk

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## 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)
```
