Giter VIP home page Giter VIP logo

unified-tpp-models's Introduction

Interoperable Module for Training Temporal Point Process Models

Model Classes

The Neural Network model Architectures and their corresponding class in the module is as follows:

  1. Neural Jump Stochastic Differential Equations (NJSDE)
  2. Recurrent Marked Temporal Point Processes (RMTPP)
  3. Transformer Hawkes Process (THP)
  4. The Neural Hawkes Process (NHP)

All the models are present in models.py file, the dataset loaders are present in datasets.py and the default config files are present in config.py file.

Steps to Train and Evaluate the models

The example shows the steps to run NJSDE on the Pilotelevator dataset (from NHP).

  • Import the NHP data reader class and the default configurations.
from module.datasets import nhpDatareader
from module.config import nhp_dataset_params
  • Initialize the class object and read the data
nhp_data = nhpDatareader(nhp_dataset_params)
train_data, val_data, total_event_num = nhp_data.read_data()
  • Process the dataset to according to NJSDE model specifications.
train, tspan = nhp_data.process_njsde()
  • Import the NJSDE model and it's default configuration.
from module.models import njsde
from module.config import njsde_params
  • Initialize the model and run the train function.
model = njsde(njsde_params)
model.train(train, tspan)
  • To get the testset results
model.predict(test, dt=1.0/30.0)

To see how to use other models with different datasets, look at the notebooks in the examples folder.

Required Installation

pip install git+https://github.com/000Justin000/torchdiffeq.git@jj585

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.