Code Monkey home page Code Monkey logo

fmge's Introduction

Fuzzy Multilevel Graph Embedding

Python (2.7) Implementation of the Fuzzy Multilevel Graph Embedding Algorithm (FMGE), an algorithm for embedding labeled graphs into vectors. (http://www.sciencedirect.com/science/article/pii/S0031320312003470).

####Please note that this is not an official implementation of the algorithm. I am in no way related to the authors.

Usage:

  • call train(list(networkx.graph), n_intervals) to learn the fuzzy overlapping intervals for the graph's attributes (Unsupervised learning phase). from the learning set
  • call embed(networkx.graph) to embed the graph into a numpy.array (vector)
  • call embed_list(list(networkx.graph) to embed a list of graphs into a numpy.array

Example:

from fmge import fmge
embedder = fmge()
embedder.train(training_graph_list, n_intervals=10)
embedded_graphs = embedder.embed_list(test_graph_list)

Input Data Format:

  • Input data are undirected graphs represented as networkx.graph
  • The node and edge attributes can be strings or floats/ints.
  • No two attributes can have the same name! This is also true for attributes from nodes and edges!

Requirements:

  • numpy
  • networkx

Differences to the paper:

I use median instead of mean to calculate the ressemblance for nodes: In the original paper the authors computed the ressemblance between all pairs of edges connected to the nodes then used their mean as the value for the ressemblance for that attribute. I use the mean (search for line np.median(all_ressemblances) to change)


Muhammad Muzzamil Luqman, Jean-Yves Ramel, Josep Lladós, Thierry Brouard, Fuzzy multilevel graph embedding, Pattern Recognition, Volume 46, Issue 2, February 2013, Pages 551-565, ISSN 0031-3203, http://dx.doi.org/10.1016/j.patcog.2012.07.029. (http://www.sciencedirect.com/science/article/pii/S0031320312003470)

Abstract:

Structural pattern recognition approaches offer the most expressive, convenient, powerful but computational expensive representations of underlying relational information. To benefit from mature, less expensive and efficient state-of-the-art machine learning models of statistical pattern recognition they must be mapped to a low-dimensional vector space. Our method of explicit graph embedding bridges the gap between structural and statistical pattern recognition. We extract the topological, structural and attribute information from a graph and encode numeric details by fuzzy histograms and symbolic details by crisp histograms. The histograms are concatenated to achieve a simple and straightforward embedding of graph into a low-dimensional numeric feature vector. Experimentation on standard public graph datasets shows that our method outperforms the state-of-the-art methods of graph embedding for richly attributed graphs.

fmge's People

Contributors

mmabrouk avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.