X-DataInitiative / tick

Module for statistical learning, with a particular emphasis on time-dependent modelling
https://x-datainitiative.github.io/tick/
BSD 3-Clause "New" or "Revised" License
484 stars 105 forks source link

Estimation of second-order statistics conditional law g_{ij}(t) in tick #433

Closed kakarun closed 4 years ago

kakarun commented 4 years ago

Hi,

How to use functions in tick to estimate the second-order statistics, i.e, conditional law g{ij}(t)? It seems that tick.hawkes.HawkesConditionalLaw can only output the estimation of the kernels, i.e., \phi{ij}(t).

Thanks!

Mbompr commented 4 years ago

Hi,

Sadly, this code was adapted from another codebase and I don't remember much about it. But maybe you could find what you are looking for in the private attributes or methods of the class, such as hawkes._G function ?

def _G(self, i, j, l, t):
    """Returns the value of a claw at a point
    Used to fill V and M with 'gauss' method
    """
    if t < 0:
        warnings.warn("G(): should not be called for t < 0")
    index = self._ijl2index[i][j][l]
    return HawkesConditionalLaw._lin0(self._int_claw[index], t)
kakarun commented 4 years ago

Hi,

Sadly, this code was adapted from another codebase and I don't remember much about it. But maybe you could find what you are looking for in the private attributes or methods of the class, such as hawkes._G function ?

def _G(self, i, j, l, t):
    """Returns the value of a claw at a point
    Used to fill V and M with 'gauss' method
    """
    if t < 0:
        warnings.warn("G(): should not be called for t < 0")
    index = self._ijl2index[i][j][l]
    return HawkesConditionalLaw._lin0(self._int_claw[index], t)

Thanks for your reply!