Giter Site home page Giter Site logo

fge_algorithm's Introduction

FGE_algorithm

FGE is an algorithmic framework for representational learning on graphs. Given any graph, it can learn continuous feature representations for the nodes, which can then be used for various downstream machine learning tasks.

The code works under Windows , Linux and other Unix variants with python. Please install networkx under version 1.1 first. <pip install networkx==1.1>

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

The Hidden Flow Structure and Metric Space of Network Embedding Algorithms Based on Random Walks
Weiwei Gu, Li Gong, Xiaodan Lou, and Jiang Zhang
Scientific Reports.

The FGE algorithm learns continuous representations for nodes in any (un)directed, (un)weighted graph.

Basic Usage

Example

To run FGE on Zachary's karate club network, execute the following command from the project home directory:
python main_appro_nd.py

Options

You can check out the other options available to use with FGE using:
python main_appro_nd.py --help

Input

The supported input format is an edgelist:

node1_id_int node2_id_int <weight_float, optional>

The graph is assumed to be undirected and unweighted by default. These options can be changed by setting the appropriate flags.

Output

The vector representation of node in graph.

Parameters:
Input graph path (-input)
Output graph path (--output_n2v)
Number of dimensions. Default is 128 (--dimensions)
Length of walk per source. Default is 10 (--walk-length)
Number of walks per source. Default is 2048 (--num-walks)
Context size for optimization. Default is 10 (--window-size)
Number of epochs in SGD. Default is 1 (-iter)
Return hyperparameter. Default is 1 (--p)
Inout hyperparameter. Default is 1 (--q)
Graph is directed. (--directed)
Graph is weighted. (--weighted )

Usage:
python ./main_appro_nd.py --input ./karate.edgelist --output_n2v ./karate_embedding --dimensions 128

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.