hmep: HMEP Multi Expression Programming – a genetic programming variant
A multi expression programming implementation with focus on speed.
https://en.wikipedia.org/wiki/Multi_expression_programming
[Skip to Readme]
Downloads
- hmep-0.0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.0.0, 0.0.1, 0.1.0, 0.1.1 |
---|---|
Change log | CHANGELOG.md |
Dependencies | base (>=4.7 && <5), containers , hmatrix , hmep , mersenne-random-pure64 , monad-mersenne-random , random , vector [details] |
License | BSD-3-Clause |
Copyright | 2017 Bogdan Penkovsky |
Author | Bogdan Penkovsky |
Maintainer | dev at penkovsky dot com |
Category | AI |
Home page | https://github.com/masterdezign/hmep#readme |
Source repo | head: git clone https://github.com/masterdezign/hmep |
Uploaded | by penkovsky at 2017年10月07日T18:22:13Z |
Distributions | |
Executables | hmep-demo |
Downloads | 2698 total (1 in the last 30 days) |
Rating | 2.0 (votes: 1) [estimated by Bayesian average] |
Your Rating |
|
Status | Docs uploaded by user Build status unknown [no reports yet] |
Readme for hmep-0.0.1
[back to package description]Multi Expression Programming
You say, not enough Haskell machine learning libraries?
Here is yet another one!
History
There exist many other Genetic Algorithm (GA) Haskell packages. Personally I have used simple genetic algorithm, GA, and moo for quite a long time. The last package was the most preferred, but the other two are also great.
However, when I came up with this MEP paper, to my surprise there was no MEP realization in Haskell. Soon I realized that existing GA packages are limited, and it would be more efficient to implement MEP from scratch.
That is how this package was started. I also wish to say thank you to the authors of the moo GA library, which inspired the present hmep package.
About MEP
Multi Expression Programming is a genetic programming variant encoding multiple solutions in the same chromosome. A chromosome is a computer program. Each gene is featuring code reuse. For more details, please check http://mepx.org/papers.html and https://en.wikipedia.org/wiki/Multi_expression_programming.
How to build
Use Stack.
$ git clone https://github.com/masterdezign/hmep.git && cd hmep
$ stack build --install-ghc
Now, run the demo to calculate cos^2(x) through sin(x):
$ stack exec hmep-demo
Average loss in the initial population 15.268705681244962
Population 10: average loss 14.709728527360586
Population 20: average loss 13.497114190675477
Population 30: average loss 8.953185872653737
Population 40: average loss 8.953185872653737
Population 50: average loss 3.3219954564955856e-15
Interpreted expression:
v1 = sin x0
v2 = v1 * v1
result = 1 - v2