Learn R Programming

Harbinger

Harbinger is a framework for event detection in time series. It provides an integrated environment for anomaly detection, change point detection, and motif discovery. Harbinger offers a broad range of methods and functions for plotting and evaluating detected events.

For anomaly detection, methods are based on: - Machine learning model deviation: Conv1D, ELM, MLP, LSTM, Random Regression Forest, and SVM - Classification models: Decision Tree, KNN, MLP, Naive Bayes, Random Forest, and SVM - Clustering: k-means and DTW - Statistical techniques: ARIMA, FBIAD, GARCH

For change point detection, Harbinger includes: - Linear regression, ARIMA, ETS, and GARCH-based approaches - Classic methods such as AMOC, ChowTest, Binary Segmentation (BinSeg), GFT, and PELT

For motif discovery, it provides: - Methods based on Hashing and Matrix Profile

Harbinger also supports multivariate time series analysis and event evaluation using both traditional and soft computing metrics.

The architecture of Harbinger is based on Experiment Lines and is built on top of the DAL Toolbox. This design makes it easy to extend and integrate new methods into the framework.


Examples

Examples of Harbinger are organized by application area:

library(harbinger)
#> Registered S3 method overwritten by 'quantmod':
#>   method            from
#>   as.zoo.data.frame zoo
#> Registered S3 methods overwritten by 'forecast':
#>   method  from 
#>   head.ts stats
#>   tail.ts stats

#loading the example database
data(examples_anomalies)

#model
model <- harbinger()

#stub detector
detection <- detect(model, examples_anomalies$simple$serie)

# filtering detected events
library(dplyr)
#> 
#> 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)

Installation

The latest version of Harbinger is available on CRAN:

install.packages("harbinger")

You can install the development version from GitHub:

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

Bug reports and feature requests

If you find any bugs or would like to suggest new features, please submit an issue here:

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

Copy Link

Version

Install

install.packages('harbinger')

Monthly Downloads

11,999

Version

1.2.747

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Eduardo Ogasawara

Last Published

October 27th, 2025

Functions in harbinger (1.2.747)

harbinger

Harbinger
har_eval_soft

Evaluation of event detection (SoftED)
hmo_mp

Motif discovery using Matrix Profile
hcp_amoc

At Most One Change (AMOC)
hmo_sax

Motif discovery using SAX
hcp_binseg

Binary Segmentation (BinSeg)
hanr_fft_binseg

Anomaly Detector using FFT with Binary Segmentation Cutoff
hanr_wavelet

Anomaly detector using Wavelets
hdis_sax

Discord discovery using SAX
hcp_pelt

Pruned Exact Linear Time (PELT)
hanr_remd

Anomaly detector using REMD
hcp_scp

Seminal change point
hanr_ml

Anomaly detector based on ML regression
hdis_mp

Discord discovery using Matrix Profile
hanr_rtad

Anomaly and change point detector using RTAD
harutils

Harbinger Utilities
hcp_garch

Change Finder using GARCH
har_plot

Plot event detection on a time series
hcp_gft

Generalized Fluctuation Test (GFT)
trans_xsax

XSAX transformation
har_eval

Evaluation of event detection
hcp_cf_arima

Change Finder using ARIMA
hcp_cf_ets

Change Finder using ETS
har_ensemble

Harbinger Ensemble
mas

Moving average smoothing
trans_sax

SAX transformation
hcp_cf_lr

Change Finder using Linear Regression
hcp_chow

Chow Test (structural break)
hmo_xsax

Motif discovery using XSAX
hmu_pca

Multivariate anomaly detector using PCA
detect

Detect events in time series
examples_motifs

Time series for motif/discord discovery
hanct_kmeans

Anomaly detector using kmeans
hanc_ml

Anomaly detector based on ML classification
han_autoencoder

Anomaly detector using autoencoders
hanr_arima

Anomaly detector using ARIMA
hanct_dtw

Anomaly detector using DTW
hanr_histogram

Anomaly detector using histograms
hanr_fft_binseg_cusum

Anomaly Detector using FFT with BinSeg and CUSUM Cutoff
hanr_fft_sma

Anomaly Detector using Adaptive FFT and Moving Average
hanr_fft_amoc

Anomaly Detector using FFT with AMOC Cutoff
hanr_fbiad

Anomaly detector using FBIAD
hanr_emd

Anomaly detector using EMD
hanr_fft

Anomaly detector using FFT
hanr_fft_amoc_cusum

Anomaly Detector using FFT with AMOC and CUSUM Cutoff
hanr_garch

Anomaly detector using GARCH
examples_anomalies

Time series for anomaly detection
examples_harbinger

Time series for event detection
examples_changepoints

Time series for change point detection