Package: hann 1.1-3

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.1-3.tar.gz
hann_1.1-3.zip(r-4.7)hann_1.1-3.zip(r-4.6)hann_1.1-3.zip(r-4.5)

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

# Install 'hann' in R:
install.packages('hann', repos = c('https://emmanuelparadis.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

4.54 score 1 stars 2 scripts 125 downloads 8 exports 0 dependencies

Last updated from:59251ecb44. Checks:8 OK, 5 FAIL. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK105
linux-devel-x86_64OK111
source / vignettesOK150
linux-release-arm64OK100
linux-release-x86_64OK114
macos-release-arm64FAIL90
macos-release-x86_64FAIL162
macos-oldrel-arm64FAIL75
macos-oldrel-x86_64FAIL131
windows-develOK107
windows-releaseOK121
windows-oldrelOK110
wasm-releaseFAIL83

Exports:binarizebuildSigmacombinecontrol.hannhannhann1hann3tune.hann

Dependencies:

Introduction to Hopfield Networks

Rendered fromIntroductionHopfieldNetworks.Rnwusingutils::Sweaveon Jun 05 2026.

Last update: 2025-12-07
Started: 2024-11-07

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