Coder Social home page Coder Social logo

xinchan / deepwalk_implementaion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mislam5285/deepwalk_implementaion

0.0 1.0 0.0 85.53 MB

This is a python implementation of DeepWalk model that was proposed by Bryan Perozzi

Python 16.92% Jupyter Notebook 83.08%

deepwalk_implementaion's Introduction

DeepWalk: Online Learning of Social Representations

This is a python implementation of DeepWalk by Bryan Perozzi. This is a contribution for Dr. Guozhu Dong's repository which is a collection of Feature Engineering projects for his new textbook called 'Feature Engineering' [currently unplublished].

Dataset : BlogCatalog

Download here: mat file

  • Number of users : 10,312
  • Number of friendships/edges : 333,983
  • Number of groups to which users can subscribe to : 39

Install pre-reqs by running: pip install -r req.txt

Run the code by entering: python DeepWalk.py

A Full list of cmd line arguments are shown by entering:

python DeepWalk.py -h
usage: DeepWalk [-h] [--d D] [--walks WALKS] [--len LEN] [--window WINDOW]
                [--hs HS] [--lw LW] [--le LE] [-w] [-e] [-o]

Implementation of DeepWalk model. File Author: Apoorva

optional arguments:
  -h, --help       show this help message and exit
  --d D            Dimensions of word embeddings
  --walks WALKS    Number of walks per node
  --len LEN        Length of random walk
  --window WINDOW  Window size for skipgram
  --hs HS          0 - Negative Sampling 1 - Hierarchical Softmax
  --lw LW          Load random walk corpus from file
  --le LE          Load embeddings from file
  -w               Flag to save random walk corpus to disk
  -e               Flag to save word embeddings to disk
  -o               Flag to save Console output to disk

Some sample walk corpus files and embeddings are included in the repository. Feel free to download and play with them.

Here is an example of how you would pass arguments from the terminal:

python DeepWalk.py --d 128 --walks 40 --len 80 --window 10 

Default values are used if no arguments are passed. Here are the default parameter values:

Dimensions = 128

Walks per node = 10

Walk length = 30

Window size for skip-gram = 5

Heirarchical Softmax = True

A Jupyter notebook version of the implementation titled DeepWalk.ipynb has also been included in the repository.

The report DeepWalkReport.pdf contains the tabulated results along with comparisons to other models and explanation of the concepts behind DeepWalk. If you want to take a look at the raw output dump of the all the test runs, they can be found at OutputDump.txt

References:

DeepWalk: Online Learning of Social Representations

Video: Presentation of DeepWalk by B. Perozzi at KDD 2014

Distributed Representations of Words and Phrases and their Compositionality

Feel free to contact me at [email protected] or HERE

deepwalk_implementaion's People

Contributors

apoorvavinod avatar

Watchers

James Cloos 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.