FullyNN#
Summary#
A recurrent encoder and a cumulative-hazard network, with intensities obtained by differentiating the hazard with respect to elapsed time.
Intensity and objective#
CumulHazardFunctionNetwork._hazard_and_intensity computes a
cumulative-hazard output \(H_k(u\mid h)\) and its time derivative.
With proper_marked_intensities: true, the derivative is computed
separately for each mark:
The shipped preset instead sets proper_marked_intensities: false.
That path differentiates the sum of the hazard outputs and divides it
equally among the event types. With \(K\) event types, it uses
FullyNN.loglike_loss uses \(\sum_k[H_k(u)-H_k(0)]\) as the
integrated total intensity when subtract_zero_hazard: true (the
default). The event term selects the observed mark’s log derivative with
a numerical epsilon. Setting subtract_zero_hazard: false retains
the legacy integral. No numerical likelihood quadrature is needed in
either mode of this loss.
Implementation: easy_tpp/model/fullynn.py. The formulas above summarize this implementation, including its numerical choices, rather than asserting equivalence to every variant in the reference.
Original reference#
Fully Neural Network based Model for General Temporal Point Processes (as listed in the repository README).
Shipped preset#
This is the packaged model fragment. Configuration and presets explains how it merges with the dataset and shared trainer presets.
trainer_config:
batch_size: 256
shuffle: False
optimizer: adam
learning_rate: 1.e-3
valid_freq: 1
use_tfb: False
metrics: [ 'acc', 'rmse' ]
seed: 2019
gpu: -1
model_config:
rnn_type: LSTM
hidden_size: 32
time_emb_size: 4
num_layers: 2
num_heads: 2
sharing_param_layer: False
loss_integral_num_sample_per_step: 20
dropout_rate: 0.0
use_ln: False
model_specs:
num_mlp_layers: 3
proper_marked_intensities: False
thinning:
num_seq: 10
num_sample: 1
num_exp: 500
look_ahead_time: 10
patience_counter: 5
over_sample_rate: 5
num_samples_boundary: 21
dtime_max: 5
num_step_gen: 1