Skip to content

Implementation of "STWalk: Learning Trajectory Representations in Temporal Graphs"

License

Notifications You must be signed in to change notification settings

supriya-gdptl/STWalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STWalk

This repository contains implementation of STWalk: Learning Trajectory Representations in Temporal Graphs.

STWalk uses structural properties of graphs at present and previous time-steps to capture the spatio-temporal behavior of nodes. There are two variants of STWalk:

  • STWalk1: Learns the trajectory representation of node by considering spatial and temporal neighbors at the same time.

  • STWalk2: It learns spatial representation and temporal representation separately and then combines them to generate trajectory representation.

Supriya Pandhre, Himangi Mittal, Manish Gupta and Vineeth N Balasubramanian STWalk: Learning Trajectory Representations in Temporal Graphs

Requirement

  • python 3.4 (or later)
  • networkx 1.11
  • gensim 2.3.0

To run the STWalk1 algorithm:

Please use --dataset argument, where dataset-name can be one of the following: "dblp", "epinion", "ciao". By default the code will be executed on Epinion dataset. The output will be saved in /epinion/output_stwalkone/ folder

cd code
python STWalk1.py --dataset epinion

To run the STWalk2 algorithm:

The output will be saved in /ciao/output_stwalktwo/ folder

cd code
python STWalk2.py --dataset ciao

Data

We experiment on three real-world datasets: DBLP, Epinion, Ciao datasets

  • Folder "dblp/input_graphs" contains DBLP co-authorship graphs. There are 45 from 1969 to 2011 excluding 1970, 1972, and 1974.
  • Folder "epinion/input_graphs" contains Epinion dataset graphs. Epinion is a popular product review site. Each node in a graph is reviewer and two reviewers share an edge if they have reviewed product from same category. We have considered 110 graphs from monthly data of March 2002 to April 2011.
  • Folder "ciao/input_graphs" contains Ciao dataset. Ciao is another popular product review site. We have considered 115 graphs from September 2001 to March 2011.

Cite

Please cite our paper if you use this code in your work:

Paper title: STWalk: Learning Trajectory Representations in Temporal Graphs

Link: https://arxiv.org/abs/1711.04150

Authors: Supriya Pandhre, Himangi Mittal, Manish Gupta, Vineeth N Balasubramanian

About

Implementation of "STWalk: Learning Trajectory Representations in Temporal Graphs"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages