The Neural Network model Architectures and their corresponding class in the module is as follows:
- Neural Jump Stochastic Differential Equations (NJSDE)
- Recurrent Marked Temporal Point Processes (RMTPP)
- Transformer Hawkes Process (THP)
- 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.
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.
pip install git+https://github.com/000Justin000/torchdiffeq.git@jj585