https://github.com/roguh/hopfield_tests
These Python scripts can be used to test the recall effectiveness of Hopfield Networks. A sample dataset composed of the Walsh vectors, an orthogonal system is included by default.
https://github.com/roguh/hopfield_tests
Last synced: 24 days ago
JSON representation
These Python scripts can be used to test the recall effectiveness of Hopfield Networks. A sample dataset composed of the Walsh vectors, an orthogonal system is included by default.
- Host: GitHub
- URL: https://github.com/roguh/hopfield_tests
- Owner: roguh
- Created: 2015-12-07T22:28:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-07T23:45:27.000Z (over 10 years ago)
- Last Synced: 2025-01-26T04:42:06.188Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Hopfield Network Performance Tests
==================================
Hopfield Networks are recursive neural networks that function as content-addressable memory. Although commonly referenced for their clear theory, it is best to see the bibliography for that. Instead, the programs here can be used to test the recall effectiveness of Hopfield Networks. A sample dataset composed of the Walsh vectors, an orthogonal system is included by default.
How to install
--------------
Python, numpy, matplotlib/pyplot are needed.
See [here](http://matplotlib.org/users/installing.html) for a description of the process.
How to run
----------
```
python3 tests.py --nvectors --size --samples --latex-ouput
```
Sample Results
--------------
```
python3 tests.py --nvectors 3, 5, 10 --samples 100 --size 5
vector size 5, vectors in memory 3 --- randomly flipped 0% of bits
matched, nearly matched, mean iterations to convergence
(100.00 ± 0.00)%, (100.00 ± 0.00)% -- 1.00
5, 3 --- 0.1%
(100.00 ± 0.00)%, (100.00 ± 0.00)% -- 2.00
5, 3 --- 0.2%
( 70.00 ± 20.00)%, ( 95.62 ± 14.79)% -- 2.00
5, 5 --- 0.0%
(100.00 ± 0.00)%, (100.00 ± 0.00)% -- 1.00
5, 5 --- 0.1%
(100.00 ± 0.00)%, (100.00 ± 0.00)% -- 2.00
5, 5 --- 0.2%
( 50.00 ± 20.98)%, ( 92.50 ± 20.16)% -- 2.67
5, 10 --- 0.0%
(100.00 ± 0.00)%, (100.00 ± 0.00)% -- 1.00
5, 10 --- 0.1%
( 47.27 ± 16.18)%, ( 96.70 ± 11.00)% -- 1.47
5, 10 --- 0.2%
( 1.82 ± 6.03)%, ( 79.72 ± 20.75)% -- 1.84
```
Bibliography
------------
[The Hopfield Model](http://page.mi.fu-berlin.de/rojas/neural/chapter/K13.pdf)
[Hopfield Networks](http://www.comp.leeds.ac.uk/ai23/reading/Hopfield.pdf)