Package: hann 1.2

Emmanuel Paradis

hann: Hopfield Artificial Neural Networks

Builds and optimizes Hopfield artificial neural networks (Hopfield, 1982, <doi:10.1073/pnas.79.8.2554>). One-layer and three-layer models are implemented. The energy of the Hopfield network is minimized with formula from Krotov and Hopfield (2016, <doi:10.48550/ARXIV.1606.01164>). Optimization (supervised learning) is done through a gradient-based method. Classification is done with S3 methods predict(). Parallelization with 'OpenMP' is used if available during compilation.

Authors:Emmanuel Paradis [aut, cre, cph]

hann_1.2.tar.gz
hann_1.2.tar.gz(r-4.7-arm64)hann_1.2.tar.gz(r-4.7-x86_64)hann_1.2.tar.gz(r-4.6-arm64)hann_1.2.tar.gz(r-4.6-x86_64)
hann_1.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
hann/json (API)
NEWS

# Install 'hann' in R:
install.packages('hann', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/emmanuelparadis/hann/issues

Uses libs:
  • openblas– Optimized BLAS
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

openblasopenmp

3.18 score 2 scripts 161 downloads 8 exports 0 dependencies

Last updated from:c42e082665. Checks:6 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK143
linux-devel-x86_64OK105
source / vignettesOK145
linux-release-arm64OK116
linux-release-x86_64OK103
wasm-releaseOK80

Exports:binarizebuildSigmacombinecontrol.hannhannhann1hann3tune.hann

Dependencies:

Introduction to Hopfield Networks

Rendered fromIntroductionHopfieldNetworks.Rnwusingutils::Sweaveon May 26 2026.

Last update: 2026-01-26
Started: 2025-07-25

Readme and manuals

Help Manual

Help pageTopics
Hopfield Artificial Neural Networkshann-package
Helper Function to Prepare Data From Imagesbinarize
Hopfield Network EnergybuildSigma
Combine Several Neural Nets for Predictioncombine
Parameters for Neural Network Optimizationcontrol.hann
Method Top-Level Functionscoef.hann fitted.hann hann labels.hann plot.hann predict.hann print.hann str.hann summary.hann
One-layer Hopfield ANNhann1 print.hann1
Three-layer Hopfield ANNhann3 print.hann3
Predictionpredict.hann1 predict.hann3
Tune Hyperparameterstune.hann