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
480 stars 105 forks source link

How to get the negative log likelihood array of the input timestamps, given the kernel type? #475

Open ANittoor opened 3 years ago

ANittoor commented 3 years ago

Hi,

Thanks for the great library!

I have a requirement where I need to rank the performance of different kernels on a given dataset of timestamps, I do the ranking based on an algorithm that uses among other things, the likelihood array of each type of kernel fit. How do I access this likelihood array? I see that there is a score function in HawkesExpKernel for example, which gives me a single value of log-likelihood (is it negative log-likelihood?).

What I am looking for is - Given a dataset of event timestamps [1, 9, 65 ... etc.] of some length n. Given the probability distribution from the kernel type. How do it get the array [NegativeLogLikelihood(events occurring at 1, 9), NegativeLogLikelihood(events occurring at 1,9,65), NegativeLogLikelihood(events occurring at 1,9,65, 72) .. etc.] of length n-1 ? I think score gives me the last value in this array for an exponential fit. How do I get the array?