Skip to content

Artificial Neural Networks for Anomaly Detection

0packages depend
9.2Kdownloads / year
80.3%test coverage
13/13flavors OK

Overview

About

Training of neural networks for classification and regression tasks using mini-batch gradient descent. Special features include a function for training autoencoders, which can be used to detect anomalies, and some related plotting functions. Multiple activation functions are supported, including tanh, relu, step and ramp. For the use of the step and ramp activation functions in detecting anomalies using autoencoders, see Hawkins et al. (2002) doi:10.1007/3-540-46145-0_17. Furthermore, several loss functions are supported, including robust ones such as Huber and pseudo-Huber loss, as well as L1 and L2 regularization. The possible options for optimization algorithms are RMSprop, Adam and SGD with momentum. The package contains a vectorized C++ implementation that facilitates fast training through mini-batch learning.

Install

Health

CRAN checks
13OK
Slowest check: 9.7 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK12 OK2026-04-25
  • NOTE12 OK, 2 NOTE2026-04-22
  • ERROR11 OK, 2 NOTE, 1 ERROR2026-04-18
Show 3 earlier changesHide 3 earlier changes
  • NOTE12 OK, 2 NOTE2026-03-13
  • ERROR11 OK, 2 NOTE, 1 ERROR2026-03-12
  • NOTE12 OK, 2 NOTE2026-03-10
Advisories

none known

Documentation

In release 2.4.0
READMEYes · 635 wordsVignettesNoNEWSNoCitation fileNoWebsitenot declared in DESCRIPTION
Help pages
21 (7 internal)
Examples that run
100%3 run in a plain check
Exported functions with examples
30%
Documented parameters
100%
Return-value docs
70%
Help pages citing references
10%

Downloads

9.2K
CRAN downloads in the past year
Rank #4,223 · ~25/day · ~770/mo
Daily download trend is not available in this view yet.
61430 days
2.1K90 days
9.2K1 year
Compare downloads with other packages →
Also on427 r2u47 autocran

Repository

12Stars
4Forks
0Open issues
0Open PRs
3Releases
261Commits
4Commit identities
artificial-neural-networksanomaly-detectionautoencodersrobust-statisticsneural-networks
License file reads as LGPL-3.0 · 261 commits · Last activity 2025-10-09
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
12
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2024-07-15 · 122026-07-07 · 12
PracticesBeta

3 development-tooling and community-health practices detected across 2 families in the upstream repository

Checks run against github.com/bflammers/ann2 on 2026-10-18.

Continuous integration (1)
GitHub Actions
Coverage (2)
Coverage reporting.covrignore
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
9 external dependencies (excludes base and recommended)

Installing ANN2 adds 41 packages (20 with compiled code, 33 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, Rcpp 1.8 MB.

Depends (0)
none
Suggests (1)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (1)
Author, Maintainer since 1.0 (2017)
Releases (15)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 2.4.0Latest
    record
    2025-10-10 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 2.3.4
    record
    2020-12-01 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 2.3.3
    record
    2020-03-15 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 2.3.2
    record
    2019-04-14 · diff ↗
  • 2.3.1
    record
    2019-03-30 · diff ↗
  • 2.3
    record
    2019-03-20 · diff ↗
  • 2.2
    record
    2019-03-19 · diff ↗
  • 2.1
    record
    2019-02-28 · diff ↗
Show 9 earlier eventsHide 9 earlier events
  • 2.0
    record
    2018-12-11 · diff ↗ ·
    removed 3 exports
    example_NN, plotStepFunction, replicator
    added 5 exports
    compression_plot, read_ANN, reconstruction_plot, train, write_ANN
  • R
    R 3.5.0 released · 2018-04-23
  • 1.5
    record
    2017-11-28 · diff ↗
  • 1.4
    record
    2017-11-24 · diff ↗ ·
    added 2 exports
    decode, encode
  • 1.3
    record
    2017-11-16 · diff ↗
  • 1.2
    record
    2017-11-15 · diff ↗
  • 1.1
    record
    2017-10-23 · diff ↗
  • 1.0
    record
    2017-10-14
  • R
    R 3.4.0 released · 2017-04-21

Package metadata

First published
2017-10-14
Total releases
15 / 9 yrs
License
GPL (>= 3) | file LICENSE OSI
Download size
274 KB
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("ANN2")
Lammers, B. (2025). ANN2: Artificial Neural Networks for Anomaly Detection (Version 2.4.0) [Computer software]. https://doi.org/10.32614/CRAN.package.ANN2

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for ANN2 version 2.4.0 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy