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.767

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Eduardo Ogasawara

Last Published

February 11th, 2026

Functions in harbinger (1.2.767)

hanr_rtad

Anomaly and change point detector using RTAD
hanr_emd

Anomaly detector using EMD
hanr_remd

Anomaly detector using REMD
hanc_ml

Anomaly detector based on ML classification
hanr_garch

Anomaly detector using GARCH
harbinger

Harbinger
har_plot

Plot event detection on a time series
har_ensemble

Harbinger Ensemble
hanr_wavelet

Anomaly detector using Wavelets
hcp_cf_ets

Change Finder using ETS
hanr_fft

Anomaly detector using FFT
hcp_cf_lr

Change Finder using Linear Regression
hanr_fft_sma

Anomaly Detector using Adaptive FFT and Moving Average
hcp_binseg

Binary Segmentation (BinSeg)
hanr_ml

Anomaly detector based on ML regression
hanr_histogram

Anomaly detector using histograms
hdis_sax

Discord discovery using SAX
hanr_fft_binseg

Anomaly Detector using FFT with Binary Segmentation Cutoff
har_eval

Evaluation of event detection
har_eval_soft

Evaluation of event detection (SoftED)
hcp_cf_arima

Change Finder using ARIMA
nab_artificialWithAnomaly

Numenta Anomaly Benchmark (NAB) – artificialWithAnomaly
hmo_mp

Motif discovery using Matrix Profile
hanr_fft_binseg_cusum

Anomaly Detector using FFT with BinSeg and CUSUM Cutoff
hcp_gft

Generalized Fluctuation Test (GFT)
hcp_pelt

Pruned Exact Linear Time (PELT)
mit_bih_V5

MIT-BIH Arrhythmia Database – V5 Lead
nab_realAWSCloudwatch

Numenta Anomaly Benchmark (NAB) realAWSCloudwatch
hcp_chow

Chow Test (structural break)
hmu_pca

Multivariate anomaly detector using PCA
hcp_garch

Change Finder using GARCH
loadfulldata

Load full dataset from mini data object
hmo_sax

Motif discovery using SAX
hmo_xsax

Motif discovery using XSAX
nab_realAdExchange

Numenta Anomaly Benchmark (NAB) – realAdExchange
hanr_fft_amoc

Anomaly Detector using FFT with AMOC Cutoff
hanr_fft_amoc_cusum

Anomaly Detector using FFT with AMOC and CUSUM Cutoff
oil_3w_Type_1

Oil Wells Dataset – Type 1
trans_sax

SAX transformation
trans_xsax

XSAX transformation
nab_realKnownCause

Numenta Anomaly Benchmark (NAB) realKnownCause
nab_realTweets

Numenta Anomaly Benchmark (NAB) realTweets
oil_3w_Type_6

Oil Wells Dataset – Type 6
nab_realTraffic

Numenta Anomaly Benchmark (NAB) realTraffic
oil_3w_Type_5

Oil Wells Dataset – Type 5
hdis_mp

Discord discovery using Matrix Profile
hcp_scp

Seminal change point
hcp_amoc

At Most One Change (AMOC)
harutils

Harbinger Utilities
mit_bih_V2

MIT-BIH Arrhythmia Database – V2 Lead
oil_3w_Type_4

Oil Wells Dataset – Type 4
mit_bih_V1

MIT-BIH Arrhythmia Database – V1 Lead
oil_3w_Type_2

Oil Wells Dataset – Type 2
ucr_power_demand

UCR Anomaly Archive – Italian Power Demand
oil_3w_Type_7

Oil Wells Dataset – Type 7
mit_bih_MLII

MIT-BIH Arrhythmia Database – MLII Lead
ucr_nasa

UCR Anomaly Archive – NASA Spacecraft
oil_3w_Type_8

Oil Wells Dataset – Type 8
mas

Moving average smoothing
ucr_int_bleeding

UCR Anomaly Archive – Internal Bleeding
ucr_ecg

UCR Anomaly Archive – ECG
A2Benchmark

Yahoo Webscope S5 – A2 Benchmark (Synthetic)
han_autoencoder

Anomaly detector using autoencoders
detect

Detect events in time series
hanr_arima

Anomaly detector using ARIMA
hanct_dtw

Anomaly detector using DTW
hanr_fbiad

Anomaly detector using FBIAD
A1Benchmark

Yahoo Webscope S5 – A1 Benchmark (Real)
A3Benchmark

Yahoo Webscope S5 – A3 Benchmark (Synthetic with Outliers)
gecco

GECCO Challenge 2018 – Water Quality Time Series
examples_anomalies

Time series for anomaly detection
examples_motifs

Time series for motif/discord discovery
examples_changepoints

Time series for change point detection
examples_harbinger

Time series for event detection
A4Benchmark

Yahoo Webscope S5 – A4 Benchmark (Synthetic with Anomalies and CPs)
hanct_kmeans

Anomaly detector using kmeans