All Projects → leoribeiro → Struc2vec

leoribeiro / Struc2vec

Licence: mit
This repository provides a reference implementation of struc2vec.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Struc2vec

Prince
Implementing PopRouting
Stars: ✭ 11 (-96.22%)
Mutual labels:  algorithm, graph
Java Ds Algorithms
Data Structures and Algorithms in Java
Stars: ✭ 125 (-57.04%)
Mutual labels:  algorithm, graph
Algorithms
Study cases for Algorithms and Data Structures.
Stars: ✭ 32 (-89%)
Mutual labels:  algorithm, graph
Learningmasteringalgorithms C
Mastering Algorithms with C 《算法精解:C语言描述》源码及Xcode工程、Linux工程
Stars: ✭ 615 (+111.34%)
Mutual labels:  algorithm, graph
Interview Questions
List of all the Interview questions practiced from online resources and books
Stars: ✭ 187 (-35.74%)
Mutual labels:  algorithm, graph
Goraph
Package goraph implements graph data structure and algorithms.
Stars: ✭ 635 (+118.21%)
Mutual labels:  algorithm, graph
Interview Guide
Coding/technical interview guide: data structures, algorithms, complexity analyses, interview questions
Stars: ✭ 54 (-81.44%)
Mutual labels:  algorithm, graph
Algodeck
An Open-Source Collection of 200+ Algorithmic Flash Cards to Help you Preparing your Algorithm & Data Structure Interview 💯
Stars: ✭ 4,441 (+1426.12%)
Mutual labels:  algorithm, graph
Leetcode
High-quality LeetCode solutions
Stars: ✭ 178 (-38.83%)
Mutual labels:  algorithm, graph
Graphview
Flutter GraphView is used to display data in graph structures. It can display Tree layout, Directed and Layered graph. Useful for Family Tree, Hierarchy View.
Stars: ✭ 152 (-47.77%)
Mutual labels:  algorithm, graph
Chat
基于自然语言理解与机器学习的聊天机器人,支持多用户并发及自定义多轮对话
Stars: ✭ 516 (+77.32%)
Mutual labels:  algorithm, graph
Javascript Datastructures Algorithms
📚 collection of JavaScript and TypeScript data structures and algorithms for education purposes. Source code bundle of JavaScript algorithms and data structures book
Stars: ✭ 3,221 (+1006.87%)
Mutual labels:  algorithm, graph
Algorithms
CLRS study. Codes are written with golang.
Stars: ✭ 482 (+65.64%)
Mutual labels:  algorithm, graph
Dsa.js Data Structures Algorithms Javascript
🥞Data Structures and Algorithms explained and implemented in JavaScript + eBook
Stars: ✭ 6,251 (+2048.11%)
Mutual labels:  algorithm, graph
Causaldiscoverytoolbox
Package for causal inference in graphs and in the pairwise settings. Tools for graph structure recovery and dependencies are included.
Stars: ✭ 447 (+53.61%)
Mutual labels:  algorithm, graph
Algorithms
Solved algorithms and data structures problems in many languages
Stars: ✭ 1,021 (+250.86%)
Mutual labels:  algorithm, graph
Samples
Sample projects using Material, Graph, and Algorithm.
Stars: ✭ 386 (+32.65%)
Mutual labels:  algorithm, graph
Competitive coding
This repository contains some useful codes, techniques, algorithms and problem solutions helpful in Competitive Coding.
Stars: ✭ 393 (+35.05%)
Mutual labels:  algorithm, graph
Data Structures
Common data structures and algorithms implemented in JavaScript
Stars: ✭ 139 (-52.23%)
Mutual labels:  algorithm, graph
Ngraph.path
Path finding in a graph
Stars: ✭ 2,545 (+774.57%)
Mutual labels:  algorithm, graph

struc2vec

This repository provides a reference implementation of struc2vec as described in the paper:

struc2vec: Learning Node Representations from Structural Identity.
Leonardo F. R. Ribeiro, Pedro H. P. Saverese, Daniel R. Figueiredo.
Knowledge Discovery and Data Mining, SigKDD, 2017.

The struc2vec algorithm learns continuous representations for nodes in any graph. struc2vec captures structural equivalence between nodes.

Before to execute struc2vec, it is necessary to install the following packages:
pip install futures
pip install fastdtw
pip install gensim

Basic Usage

Example

To run struc2vec on Mirrored Zachary's karate club network, execute the following command from the project home directory:
python src/main.py --input graph/karate-mirrored.edgelist --output emb/karate-mirrored.emb

Options

To activate optimization 1, use the following option: --OPT1 true
To activate optimization 2: --OPT2 true
To activate optimization 3: --OPT3 true

To run struc2vec on Barbell network, using all optimizations, execute the following command from the project home directory:
python src/main.py --input graph/barbell.edgelist --output emb/barbell.emb --num-walks 20 --walk-length 80 --window-size 5 --dimensions 2 --OPT1 True --OPT2 True --OPT3 True --until-layer 6

You can check out the other options available to use with struc2vec using:
python src/main.py --help

Input

The supported input format is an edgelist:

node1_id_int node2_id_int

Output

The output file has n+1 lines for a graph with n vertices. The first line has the following format:

num_of_nodes dim_of_representation

The next n lines are as follows:

node_id dim1 dim2 ... dimd

where dim1, ... , dimd is the d-dimensional representation learned by struc2vec.

Miscellaneous

Please send any questions you might have about the code and/or the algorithm to [email protected].

Note: This is only a reference implementation of the framework struc2vec.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].