All Projects → lucashu1 → Link Prediction

lucashu1 / Link Prediction

Licence: mit
Representation learning for link prediction within social networks

Projects that are alternatives of or similar to Link Prediction

Firstcoursenetworkscience
Tutorials, datasets, and other material associated with textbook "A First Course in Network Science" by Menczer, Fortunato & Davis
Stars: ✭ 111 (-54.69%)
Mutual labels:  jupyter-notebook, social-network
Srl Zoo
State Representation Learning (SRL) zoo with PyTorch - Part of S-RL Toolbox
Stars: ✭ 125 (-48.98%)
Mutual labels:  autoencoder, representation-learning
Sigver wiwd
Learned representation for Offline Handwritten Signature Verification. Models and code to extract features from signature images.
Stars: ✭ 112 (-54.29%)
Mutual labels:  jupyter-notebook, representation-learning
Codesearchnet
Datasets, tools, and benchmarks for representation learning of code.
Stars: ✭ 1,378 (+462.45%)
Mutual labels:  jupyter-notebook, representation-learning
Simclr
SimCLRv2 - Big Self-Supervised Models are Strong Semi-Supervised Learners
Stars: ✭ 2,720 (+1010.2%)
Mutual labels:  jupyter-notebook, representation-learning
Gspan
Python implementation of frequent subgraph mining algorithm gSpan. Directed graphs are supported.
Stars: ✭ 103 (-57.96%)
Mutual labels:  graph-algorithms, jupyter-notebook
Deeptime
Deep learning meets molecular dynamics.
Stars: ✭ 123 (-49.8%)
Mutual labels:  jupyter-notebook, autoencoder
Lipreading
Stars: ✭ 49 (-80%)
Mutual labels:  jupyter-notebook, autoencoder
Tensorflow 101
中文的 tensorflow tutorial with jupyter notebooks
Stars: ✭ 172 (-29.8%)
Mutual labels:  jupyter-notebook, autoencoder
Motion Sense
MotionSense Dataset for Human Activity and Attribute Recognition ( time-series data generated by smartphone's sensors: accelerometer and gyroscope)
Stars: ✭ 159 (-35.1%)
Mutual labels:  jupyter-notebook, autoencoder
Kglab
Graph-Based Data Science: an abstraction layer in Python for building knowledge graphs, integrated with popular graph libraries – atop Pandas, RDFlib, pySHACL, RAPIDS, NetworkX, iGraph, PyVis, pslpython, pyarrow, etc.
Stars: ✭ 98 (-60%)
Mutual labels:  graph-algorithms, jupyter-notebook
Pytorch Byol
PyTorch implementation of Bootstrap Your Own Latent: A New Approach to Self-Supervised Learning
Stars: ✭ 213 (-13.06%)
Mutual labels:  jupyter-notebook, representation-learning
Evalne
Source code for EvalNE, a Python library for evaluating Network Embedding methods.
Stars: ✭ 67 (-72.65%)
Mutual labels:  graph-algorithms, representation-learning
Deepai
Detection of Accounting Anomalies using Deep Autoencoder Neural Networks - A lab we prepared for NVIDIA's GPU Technology Conference 2018 that will walk you through the detection of accounting anomalies using deep autoencoder neural networks. The majority of the lab content is based on Jupyter Notebook, Python and PyTorch.
Stars: ✭ 104 (-57.55%)
Mutual labels:  jupyter-notebook, autoencoder
Codeslam
Implementation of CodeSLAM — Learning a Compact, Optimisable Representation for Dense Visual SLAM paper (https://arxiv.org/pdf/1804.00874.pdf)
Stars: ✭ 64 (-73.88%)
Mutual labels:  autoencoder, representation-learning
Pytextrank
Python implementation of TextRank for phrase extraction and summarization of text documents
Stars: ✭ 1,675 (+583.67%)
Mutual labels:  graph-algorithms, jupyter-notebook
Concise Ipython Notebooks For Deep Learning
Ipython Notebooks for solving problems like classification, segmentation, generation using latest Deep learning algorithms on different publicly available text and image data-sets.
Stars: ✭ 23 (-90.61%)
Mutual labels:  jupyter-notebook, autoencoder
Pytorch Mnist Vae
Stars: ✭ 32 (-86.94%)
Mutual labels:  jupyter-notebook, autoencoder
Kate
Code & data accompanying the KDD 2017 paper "KATE: K-Competitive Autoencoder for Text"
Stars: ✭ 135 (-44.9%)
Mutual labels:  autoencoder, representation-learning
Ppnp
PPNP & APPNP models from "Predict then Propagate: Graph Neural Networks meet Personalized PageRank" (ICLR 2019)
Stars: ✭ 177 (-27.76%)
Mutual labels:  graph-algorithms, jupyter-notebook

Link Prediction Experiments

This repository contains a series of machine learning experiments for link prediction within social networks.

We first implement and apply a variety of link prediction methods to each of the ego networks contained within the SNAP Facebook dataset and SNAP Twitter dataset, as well as to various random networks generated using networkx, and then calculate and compare the ROC AUC, Average Precision, and runtime of each method.

If you use this repository in your work, please cite the corresponding DOI:

DOI

Link Prediction Methods Tested:

Requirements

Pre-Use Installation

python setup.py install

Included Files

Network Data

  • facebook/: Original Facebook ego networks dataset, with added .allfeats files (with both ego and alter features)
  • fb-processed/: Pickle dumps of (adjacency_matrix, feature_matrix) tuples for each ego network, and for combined network
  • twitter/: Twitter ego networks dataset (combined), with adjacency matrix pickle dump
  • visualizations/: Visualizations of each network generated by networkx and matplotlib
  • network-statistics/: .txt and .pkl files of pre-calculated network characteristics (with info on connectivity, network size, etc.) for each network
  • train-test-splits/: Pickle dumps of pre-processed train-test splits for Facebook ego networks, with varying degrees of visibility (i.e. how many edges are hidden). Includes: adj_train, train_edges, train_edges_false, val_edges, val_edges_false, test_edges, test_edges_false
  • process-ego-networks.py: Script used to process raw Facebook data and generate pickle dumps
  • process-combined-network.py: Script used to combine Facebook ego networks and generate complete network pickle dump
  • process-twitter-network.py: Script used to process raw Twitter data and generate pickle dumps
  • fb-train-test-splits.py: Script used to generate and store train-test splits for each Facebook ego network
  • twitter-train-test-splits.py: Script used to generate and store train-test-splits for Twitter combined network

Annotated Link Prediction IPython Notebooks

  • link-prediction-baselines.ipynb: Adamic-Adar, Jaccard Coefficient, Preferential Attachment
  • spectral-clustering.ipynb: Using spectral embeddings for link prediction
  • node2vec.ipynb: Skip-gram based representation learning for node/edge embeddings
  • graph-vae.ipynb: (Variational) Graph Autoencoder, learns node embeddings to recreate adjacency matrix

Link Prediction Helper Scripts

  • link_prediction_scores.py: Utility functions for running various link prediction tests

Exploratory Analysis

  • network-visualizations.ipynb: Generate .pdf visualizations for each network, in addition to calculating and storing a variety of network metrics (e.g. transtivity, avg. clustering coefficient, etc.)

Full Link Prediction Experiments

  • nx-graph-experiments.ipynb: Run all link prediction tests on various types of random networks (Erdos-Renyi, Barabasi-Albert, etc.)
  • fb-graph-experiments.ipynb: Run all link prediction tests on each Facebook ego network
  • run-all-experiments.py: Run all link prediction experiments (on both Facebook networks and random networkx networks), save results as pickle dumps in results
  • run-twitter-experiments.py: Run all link prediction experiments on combined (directed) Twitter network. Warning: may take a while to run.

Results

  • results/: Pickle dumps of experiment results, with results (ROC AUC, ROC Curve, Avg. Precision, Runtime) stored for each link prediction method in Python dictionary form
  • investigate-results.ipynb: Generate and save bar plots/ROC curve plots for each method and graph type, save network characteristics to .txt files
  • result-plots-by-graph/: Bar plots for the results of each experiment (ROC AUC, AP, Minimum Runtime) organized by network, in .pdf form
  • result-plots-by-algorithm/: Bar plots for the AUROC results of each experiment organized by link prediction algorithm, in .pdf form
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].