MyNixOS website logo
Description

A Unified Time Series Event Detection Framework.

By analyzing time series, it is possible to observe significant changes in the behavior of observations that frequently characterize events. Events present themselves as anomalies, change points, or motifs. In the literature, there are several methods for detecting events. However, searching for a suitable time series method is a complex task, especially considering that the nature of events is often unknown. This work presents Harbinger, a framework for integrating and analyzing event detection methods. Harbinger contains several state-of-the-art methods described in Salles et al. (2020) <doi:10.5753/sbbd.2020.13626>.

Logo do pacote Harbinger Harbinger

GitHubStars CRAN Downloads

Time-series event analysis is rarely a matter of calling one isolated function. In practice, the analyst needs to understand the signal, choose a suitable family of methods, inspect the result visually, and evaluate whether the detected events actually correspond to the phenomenon of interest. Harbinger was designed to support this full learning and experimentation path with a unified interface for anomaly detection, change-point detection, motif discovery, transformations, plotting, and evaluation.

The package is not only a catalog of methods. It is also a framework for organizing event-oriented studies in a more consistent way, from first examples to reusable experiment lines.


Documentation

The documentation was reorganized to support two complementary entry points:

  • a guided tutorial track for readers who want to learn the workflow step by step
  • thematic example collections for readers who want to inspect a specific family of methods

If you are new to harbinger, start with the tutorials. If you already know the basic workflow, the thematic collections remain available and are grouped by subject in a more didactic order.

Guided tutorial track

  • Tutorials - a 10-part learning sequence covering first contact with the package, data inspection, plotting, baseline anomaly detection, residual-based detection, evaluation, change points, smoothing, symbolic transformations, and motif analysis.

Thematic example collections

  • General examples - package orientation, utility helpers, and evaluation objects that explain the common structure behind the methods.
  • Dataset examples - benchmark archives and domain datasets, organized to help the reader understand the collections before modeling.
  • Transformation examples - smoothing and symbolic encodings that prepare a series for later anomaly, change-point, or motif analysis.
  • Anomaly examples - anomaly detection methods grouped from simple baselines to residual models, supervised learners, clustering, ensembles, autoencoders, and multivariate workflows.
  • Change-point examples - change-point methods ordered from a first single-break intuition to multiple-break, structural-break, and volatility-oriented techniques.
  • Motif examples - repeated-pattern and discord analysis grouped into Matrix Profile, symbolic, and discord-oriented studies.
  • Custom examples - extension-oriented notebooks showing how to plug new transformations, detectors, motif methods, and evaluators into Harbinger.

Documentation design

The examples were revised to be more useful for learning:

  • files inside each collection are numbered in a suggested reading order
  • category README files group examples by subject rather than only by function name
  • tutorials and introductory notebooks explain the technique being presented, not only the commands required to run it

A first example

The snippet below uses the default harbinger() pipeline on a bundled dataset. It is intentionally short so that a new reader can see the minimum workflow before moving to the more didactic notebooks in /examples/.

library(harbinger)

# Load an example dataset with labeled anomalies
data(examples_anomalies)

# Create the default detector and run it on the series
model <- harbinger()
detection <- detect(model, examples_anomalies$simple$serie)

# Inspect only the detected events
library(dplyr)
#> Warning: package 'dplyr' was built under R version 4.5.3
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
print(detection |> dplyr::filter(event == TRUE))
#> [1] idx   event type 
#> <0 rows> (or 0-length row.names)

Suggested learning order

If you are new to the package, this sequence works well:

  1. start with Tutorials to understand the basic workflow
  2. continue with General examples for a compact view of package scope, utilities, and evaluation
  3. visit Dataset examples to understand the benchmark collections before choosing a method
  4. visit Transformation examples to see how smoothing and symbolic encodings change the signal before analysis
  5. move to one modeling family, usually Anomaly examples or Change-point examples
  6. study Motif examples after you are comfortable with subsequences, windows, and symbolic representations
  7. finish with Custom examples when you want to integrate your own components into the framework

Installation

The latest version of Harbinger at CRAN is available at: https://CRAN.R-project.org/package=harbinger

You can install the stable version from CRAN with:

install.packages("harbinger")

You can install the development version from GitHub with:

library(devtools)
devtools::install_github("cefet-rj-dal/harbinger", force = TRUE, upgrade = "never")

Bug reports and feature requests

https://github.com/cefet-rj-dal/harbinger/issues.

Metadata

Version

2.0.757

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows