Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Haskell implementations of various ML algorithms.
Haskell
branch: master

Cleanups.

Summary:

Test Plan:

Reviewers:

CC:
latest commit 593ab6d9e3
@ajtulloch authored

README.md

MachineLearning in Haskell

This is a library implementing some basic machine learning algorithms.

Hopfield Networks

To run the demonstration, run MachineLearning/HopfieldDemonstration.hs. It demonstrates the training of a network on an O and an X, and shows the network reconstructing the trained patterns from a perturbed version.

~/Code/haskell/machinelearning $ runhaskell MachineLearning/HopfieldDemonstration.hs
Training patterns
--------
|X    X|
| X  X |
|  XX  |
|  XX  |
|  XX  |
| X  X |
|X    X|
--------
--------
|XXXXXX|
|X    X|
|X    X|
|X    X|
|X    X|
|X    X|
|XXXXXX|
--------
Validation
("Corruption error",6.3245554)
("Reproduction error",0.0)
"Original"
--------
|X    X|
| X  X |
|  XX  |
|  XX  |
|  XX  |
| X  X |
|X    X|
--------
"Corrupted"
--------
|X  X X|
|    X |
|X XXXX|
|  XX  |
|  XXX |
| XX X |
|X XXXX|
--------
"Reproduction"
--------
|X    X|
| X  X |
|  XX  |
|  XX  |
|  XX  |
| X  X |
|X    X|
--------
("Corruption error",6.6332498)
("Reproduction error",0.0)
"Original"
--------
|XXXXXX|
|X    X|
|X    X|
|X    X|
|X    X|
|X    X|
|XXXXXX|
--------
"Corrupted"
--------
|XXXXXX|
|     X|
|     X|
| X X X|
|X  X  |
|  XX X|
|X XXXX|
--------
"Reproduction"
--------
|XXXXXX|
|X    X|
|X    X|
|X    X|
|X    X|
|X    X|
|XXXXXX|
--------

Bitdeli Badge

Something went wrong with that request. Please try again.