deepof.utils.kleinberg_core_numba

deepof.utils.kleinberg_core_numba(gaps: array, s: float64, gamma: float64, n: int, T: float64, k: int) array

Computation intensive core part of Kleinberg’s algorithm (described in ‘Bursty and Hierarchical Structure in Streams’).

The algorithm models activity bursts in a time series as an infinite hidden Markov model.

Taken from pybursts (https://github.com/romain-fontugne/pybursts/blob/master/pybursts/pybursts.py) and rewritten for compatibility with numba.

Args:

gaps (np.array): an array of gap sizes between time offsets (numeric) s (float): the base of the exponential distribution that is used for modeling the event frequencies gamma (float): coefficient for the transition costs between states n: used to adjust the fixed cost function (not dependent of the given offsets). Which is needed if you want to compare bursts for different inputs. T: used to adjust the fixed cost function (not dependent of the given offsets). Which is needed if you want to compare bursts for different inputs. k: maximum burst level / number of hidden states

:+