CRAN Task View: Anomaly Detection

Maintainer:Priyanga Dilini Talagala, Rob J. Hyndman, Gaetano Romano
Contact:priyangad at uom.lk
Version:2025-10-21
URL:https://CRAN.R-project.org/view=AnomalyDetection
Source:https://github.com/cran-task-views/AnomalyDetection/
Contributions:Suggestions and improvements for this task view are very welcome and can be made through issues or pull requests on GitHub or via e-mail to the maintainer address. For further details see the Contributing guide.
Citation:Priyanga Dilini Talagala, Rob J. Hyndman, Gaetano Romano (2025). CRAN Task View: Anomaly Detection. Version 2025-10-21. URL https://CRAN.R-project.org/view=AnomalyDetection.
Installation:The packages from this task view can be installed automatically using the ctv package. For example, ctv::install.views("AnomalyDetection", coreOnly = TRUE) installs all the core packages or ctv::update.views("AnomalyDetection") installs all packages that are not yet installed and up-to-date. See the CRAN Task View Initiative for more details.

This CRAN task view provides a comprehensive list of R packages for anomaly detection. Anomaly detection problems have many facets, and the techniques used are influenced by factors such as how anomalies are defined, the type of input data, and the expected output. These variations lead to diverse problem formulations, requiring different analytical approaches. This Task View helps users navigate the available tools by organizing them based on their applicability to different data types and detection methodologies.

Anomalies are often referred to by alternative names such as outliers, novelties, odd values, extreme values, faults, and aberrations, depending on the application domain. In this task view, these terms are used interchangeably. The overview covers methods applicable to univariate, multivariate, spatial, temporal, and functional data, ensuring that users can identify suitable tools for various analytical needs. Packages that do not primarily focus on anomaly detection but provide substantial functionality for it are also included.

Packages where anomaly detection is only a minor feature or offers very limited functions have been excluded. Tools that are outdated, redundant, or lack sufficient support have also not been considered.

To facilitate navigation, the task view is structured into well-defined sections, including univariate outlier detection, multivariate detection (further categorized into density-based, distance-based, clustering-based, angle-based, and decision tree-based methods), temporal data, spatial and spatio-temporal data, functional data, and other specialized approaches. There is some overlap between the tools in this task view and those listed in the task views for Cluster, Epidemiology, ExtremeValue, and TimeSeries.

Univariate outlier detection

Univariate outlier detection methods focus on values in a single feature space.

Multivariate outlier detection

Under a multivariate, high-dimensional, or multidimensional scenario, where the focus is on n (>2)-dimensional space, all attributes might be of the same type or might be a mixture of different types, such as categorical or numerical, which has a direct impact on the implementation and scope of the algorithm. The problems of anomaly detection in high-dimensional data are threefold, involving detection of (a) global anomalies, (b) local anomalies, and (c) microclusters or clusters of anomalies. Global anomalies are very different from the dense area with respect to their attributes. In contrast, a local anomaly is only an anomaly when it is distinct from, and compared with, its local neighbourhood. Microclusters, or clusters of anomalies, may cause masking problems. The following categorization of multivariate outlier detection techniques is based on the underlying methodological principle, including density-based outlier detection, distance-based outlier detection, clustering-based outlier detection, angle-based outlier detection, and decision tree-based approaches.

Multivariate outlier detection: Density-based outlier detection

Multivariate outlier detection: Distance-based outlier detection

Multivariate outlier detection: Clustering-based outlier detection

Multivariate outlier detection: Angle-based outlier detection

Multivariate outlier detection: Decision tree based approaches

Multivariate outlier detection: Other approaches

Temporal data

The problems of anomaly detection for temporal data are three-fold: (a) the detection of contextual anomalies (point anomalies) within a given series; (b) the detection of anomalous subsequences within a given series; and (c) the detection of anomalous series within a collection of series.

Related algorithms for identifying structural breaks and regime shifts are discussed in the Change point detection section of the Time Series Task View. Change point detection methods aim to locate abrupt changes in the statistical properties of a time series, which are conceptually similar to detecting anomalous subsequences. In some contexts, such as an epidemic change that represents a temporary deviation affecting a contiguous segment of the series, this can be regarded as the detection of anomalous subsequences within a given series.

Anomaly detection methods for temporal data can be broadly divided into two categories: Offline (Batch) procedures, which analyze the complete time series retrospectively, and Online (Sequential / Real-Time) procedures, which detect anomalies as data arrives sequentially.

Offline (batch) procedures

These methods assume that the complete time series is available for analysis and are typically applied retrospectively to detect anomalies.

Online (sequential / real-time) procedures

These methods detect anomalies as new data arrives, supporting real-time or near-real-time monitoring. Many methods include an initial offline phase for model fitting or training, followed by a sequential testing or filtering phase, often using sliding windows, adaptive thresholds, or recursive models.

Spatial data

Spatio-temporal data

Functional data

Visualization of outlier

Pre-processing methods for outlier detection

Specific application fields

Epidemiology applications

Environmental science / hydrology / meteorology applications

Biomedical and clinical research applications

Genetics and bioinformatics applications

Seismology and geoscience applications

Political science and election analysis

Finance and econometrics applications

Data sets

Educational and companion resources

Miscellaneous

CRAN packages

Core:HDoutliers, OutliersO3, weird.
Regular:abnormality, abodOutlier, ABPS, ACA, adamethods, alphaOutlier, amelie, ANN2, anomalize, anomaly, AnomalyScore, bagged.outliertrees, bigutilsr, boutliers, bulkQC, cellWise, CerioliOutlierDetection, CircOutlier, compositions, CoordinateCleaner, crseEventStudy, dbscan, ddalpha, DeBoinR, densratio, depth.plot, DescTools, dixonTest, DJL, dobin, EFDR, enpls, envoutliers, evtclass, extremeIndex, extremevalues, faoutlier, FastPCS, FastRCS, fda.usc, fdaoutlier, fdasrvf, funModeling, GGoutlieR, hotspots, HRTnomaly, ICSOutlier, isotree, kernlab, kfino, kmodR, kuiper.2samp, ldbod, lookout, MALDIrppa, MGBT, modi, Morpho, mrct, mrfDepth, mvout, mvoutlier, NMAoutlier, npphen, oclust, oddnet, oddstream, odetector, OmicsQC, outbreaker2, outbreaks, outForest, outlierensembles, outlierMBC, outliers, outliers.ts.oga, OutliersLearn, outliertree, OutSeekR, pasadr, pcadapt, phylter, precintcon, probout, qpcR, rainbow, referenceIntervals, Rlof, RMSD, RMSDp, RobKF, Routliers, rrcovHD, scanstatistics, SCOUTer, seasonal, seismicRoll, SeleMix, sGMRFmix, ShapleyOutlier, SMLoutliers, solitude, spectralAnomaly, spikes, StatDA, stray, survBootOutliers, surveillance, trendsegmentR, TSA, tsoutliers, UAHDataScienceO, univOutl, washeR, wbacon, wql.

Related links

Other resources