The fastbursts package provides a performance-optimized implementation of Kleinberg's (2002) burst detection algorithm, utilizing a linear-time dynamic programming approach for efficient analysis of large event sequences.
The standard bursts package in R has an
fastbursts implements the same algorithm using a back-pointer (Viterbi) approach, reducing the complexity to fastbursts is 30x-100x faster for moderate datasets and maintains 100% output parity with the original package.
You can install the development version from GitHub:
# install.packages("remotes")
remotes::install_github("joelyew/fastbursts")library(fastbursts)
# Example event offsets
offsets <- c(seq(0, 400, 100), seq(410, 450, 5), seq(451, 470, 2),
seq(480, 600, 5), 700, seq(710, 800, 5), 900, 1000)
# Run burst detection
result <- kleinberg(offsets)
# Plot results
plot(result)