Git Product home page Git Product logo

chip-network-model's Introduction

Community Hawkes Independent Pairs (CHIP) Network Model

This repo includes the Python implementation of the CHIP network model as well as the code to replicate all experiments in the paper CHIP: A Hawkes Process Model for Continuous-time Networks with Scalable and Consistent Estimation, presented at Neural Information Processing Systems (NeurIPS) 2020.

Introduction

CHIP is a generative model for continuous-time networks of timestamped relational events, where each event is a triplet (i, j, t) denoting events from node i (sender) to node j (receiver) at timestamp t.

Main contributions:

  1. We demonstrate that spectral clustering provides consistent community detection in CHIP for a growing number of nodes.
  2. We propose consistent and computationally efficient estimators for the model parameters for a growing number of nodes and time duration.
  3. We show that CHIP provides better fits to several real datasets and scales to much larger networks than existing models, including a Facebook network with over 40,000 nodes and over 800,000 events.

Setup

This repo has been developed and tested using Python 3.6.9. The code does not work with Python 2.7.

To run experiments, either clone or fork this repository and refer to requirements.txt for the required packages.

Datasets

All datasets used in this repo are either available in the storage/datasets directory or will be automatically downloaded by the preprocessing script.

Examples

There are 3 Jupyter notebook examples of the CHIP model in the examples directory:

Contact

Please contact us if you have any questions or to report an issue. You can find the contact information of all three authors in the paper.

This repository has been published for the sole purpose of providing more information on the aforementioned publication.

chip-network-model's People

Contributors

arastuie avatar dependabot[bot] avatar kevin-s-xu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

chip-network-model's Issues

tick and Joblib dependency on Python 3.8

To use 'tick' and 'Joblib' dependencies, I had to roll back to Python 3.6. Then had to roll back to scikit-learn==0.21.2 for Joblib dependency.

Below are the steps I did in iTerm2 to create a conda enviroment to run all three notebooks in your example folder (I'm running JupyterLab 2.2.6 and Spyder 4.1.5 via Anaconda on Mohave OSX):

Create a new conda environment

conda create --name py362 python=3.6.2
conda activate py362

########################################################################

This section is only if you want to install the variable explorer extension in JupyterLab on Python 3.6.2:

First..Completely install conda nodes.js:

conda install -c conda-forge nodejs
conda install -c conda-forge/label/gcc7 nodejs
conda install -c conda-forge/label/cf201901 nodejs
conda install -c conda-forge/label/cf202003 nodejs

Now install extension:

jupyter labextension install @lckr/jupyterlab_variableinspector

########################################################################

Run the following commands before running CHIP .ipynb examples:

conda install numpy
conda install matplotlib
conda install networkx
conda install joblib
pip install tick
conda install scikit-learn==0.21.2
conda install dill

Good point to backup:

conda create --name py362clone --clone py362

For Spyder

If everything runs good in JupyterLab, now install Spyder 4.1.5

conda install -c anaconda spyder

will need to convert .ipynb to .py for Spyder IDE usage

For plots to show in JupyterLab or Spyder:

Need to put this command in every cell before first plt. command:

%matplotlib inline

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.