Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnmyleswhite/HopfieldNets.jl
Hopfield networks in Julia
https://github.com/johnmyleswhite/HopfieldNets.jl
Last synced: 3 months ago
JSON representation
Hopfield networks in Julia
- Host: GitHub
- URL: https://github.com/johnmyleswhite/HopfieldNets.jl
- Owner: johnmyleswhite
- License: other
- Created: 2013-07-28T15:30:39.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-05T17:19:39.000Z (over 9 years ago)
- Last Synced: 2024-07-19T22:47:50.600Z (4 months ago)
- Language: Julia
- Size: 215 KB
- Stars: 14
- Watchers: 7
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
HopfieldNets.jl
===============# NOTICE
**This package is unmaintained. Its reliability is not guaranteed.**
# Introduction
Discrete and continuous Hopfield nets in Julia.
# Usage Example
We'll restore a corrupted representation fo the letter X specified as a vector of -1's and +1's:
using HopfieldNets
include(Pkg.dir("HopfieldNets", "demo", "letters.jl"))
patterns = hcat(X, O)
n = size(patterns, 1)
net = DiscreteHopfieldNet(n)
train!(net, patterns)
settle!(net, 10, true)
Xcorrupt = copy(X)
for i = 2:7
Xcorrupt[i] = 1
endXrestored = associate!(net, Xcorrupt)
all(Xcorrupt .== X)
all(Xrestored .== X)# Sources
The idea for the letters demo is taken from an implementation of [Hopfield nets in Ruby](https://github.com/bartolsthoorn/hopfield-ruby). The code is based on the presentation of the theory in Mackay's book and in Storkey's learning rule paper.