Giter Site home page Giter Site logo

neurawkes's Introduction

The Neural Hawkes Process

Source code for The Neural Hawkes Process (NeurIPS 2017) runnable on GPU and CPU.

Please check out The Neural Hawkes Particle Smoothing for PyTorch Implementation (and more).

Reference

If you use this code as part of any published research, please acknowledge the following paper (it encourages researchers who publish their code!):

The Neural Hawkes Process: A Neurally Self-Modulating Multivariate Point Process
Hongyuan Mei and Jason Eisner

@inproceedings{mei2017neuralhawkes,
  author =      {Hongyuan Mei and Jason Eisner},
  title =       {The Neural {H}awkes Process: {A} Neurally Self-Modulating Multivariate Point Process},
  booktitle =   {Advances in Neural Information Processing Systems},
  year =        {2017},
  month =       dec,
  address =     {Long Beach},
  url =         {https://arxiv.org/abs/1612.09328}
}

Instructions

Here are the instructions to use the code base

Dependencies

This code is written in python. To use it you will need:

  • Anaconda - Anaconda includes all the Python-related dependencies
  • Theano - Computational graphs are built on Theano

Prepare Data

Download datasets to the 'data' folder

Train Models

To train the model, try the command line below for detailed guide:

python train_models.py --help

Test Models

To evaluate (dev or test) and save results, use the command line below for detailed guide:

python test_models_and_save.py --help

Generate Sequences

To generate sequences (with trained or randomly initialized models), try the command line:

python generate_sequences.py --help

Significant Tests

To test statistical significance by boostrapping over dev/test set, try the command line:

python generate_sequences.py --help

License

This project is licensed under the MIT License - see the LICENSE file for details

neurawkes's People

Contributors

hongyuanmei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neurawkes's Issues

Dear Mei, how do you predict the time and type of next event in your code with the specific integral?

Dear Mei,
Sorry to bother you again, but I have a question about the prediction, first of all the equations to predict in shown in below:

image

Thus, we need to calculate an integeral from t_{i-1} to infinity, based on Monte Carlo sampling, but how can we sample uniformly in the interval [t_{i-1}, + infinity)? I tried to find the answer in your code, but I am still confused, I really need your help, thank you so much.

How did you format the data?

Hello, I looked at the data and I am wondering how did you format the dataset from the original dataset. Also,
Screen Shot 2021-07-27 at 12 19 58 PM
I think the time_since_last_event should always be 0 at the start of the stream but why the time_since_start is not always 0? Isnt the stream should always start at 0 (since the time is relevant)?

neural hawkes process

Hi
I'm interested in implementing your work in pytorch and use it in my personal project
I found your repo of your latest work, neural hawkes particle smoothing,
and it seems using C-Lstm which is I guess the main part of neural hawkes process.

So is it really identical?
What part of NHPS is the original neural hawkes process?

Thanks

A question about Integral Estimation (Monte Carlo)

Hi,
First, I want to thank you very much for sharing this project.

I have a question about your implementation which may be irrelevant and I apologize for that.

I am trying to implement this method using PyTorch, but I couldn't understand how you have handled complexity of Monte Carlo method for estimating integral in likelihood function, because of large number of samples. Since if we sample one by one it takes very long time (I have tested it) and if we construct a batch of these samples, because of different sequence sizes of them (because some of samples may have fewer previous events), we can not use it as an input for this model. I wanted to ask you that how you could manage this problem or in which part of this code I can understand it? I would appreciate it a lot if you could guide me.

Thank you.

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.