THP === Summary ------- A causal Transformer history encoder with an affine elapsed-time term and a positive intensity for each event type. Intensity and objective ----------------------- ``compute_states_at_sample_times`` adds the learned time slope, history projection, and base parameter before applying scaled softplus: .. math:: \lambda_k(u\mid h)=\operatorname{ScaledSoftplus}_k \left(\alpha_k u+[Wh]_k+b_k\right). Here :math:`\alpha_k` is ``factor_intensity_decay`` and :math:`b_k` is ``factor_intensity_base``. The loss is the negative marked event log-intensity sum plus the integrated total intensity, using the shared :doc:`../likelihood_integration` helper. Implementation: `easy_tpp/model/thp.py `_. The formulas above summarize this implementation, including its numerical choices, rather than asserting equivalence to every variant in the reference. Original reference ------------------ `Transformer Hawkes process `_ (as listed in the repository README). Shipped preset -------------- This is the packaged model fragment. :doc:`/user_manual/configuration` explains how it merges with the dataset and shared trainer presets. .. literalinclude:: ../../../../easy_tpp/configs/model/THP.yaml :language: yaml API --- :class:`easy_tpp.model.THP` ยท :doc:`/api/models`