[mlpack-git] [mlpack/mlpack] Neural evolution algorithms implementation (CNE, NEAT, HyperNEAT) (#686)
Marcus Edel
notifications at github.com
Wed Jul 13 10:51:31 EDT 2016
> +
> + for (ssize_t i=0; i<genome1.NumLink(); ++i) {
> + int linkEnabledInGenome1 = (int) genome1.aLinkGenes[i].Enabled();
> + ssize_t innovId = genome1.aLinkGenes[i].InnovationId();
> + ssize_t idx = genome2.GetLinkIndex(innovId);
> + bool linkContainedInGenome2 = (idx != -1);
> +
> + if (linkContainedInGenome2) {
> + int linkEnabledInGenome2 = (int) genome2.aLinkGenes[idx].Enabled();
> + deltaW += std::abs(genome1.aLinkGenes[i].Weight() * linkEnabledInGenome1 -
> + genome2.aLinkGenes[idx].Weight() * linkEnabledInGenome2);
> + ++coincident;
> + }
> + }
> +
> + deltaW = deltaW / coincident;
We should check if matching or coincident is > 0.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/686/files/ff45785b8669f82beb38ef5392f48bcdf5c83f6a#r70640409
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160713/ed70fa71/attachment-0001.html>
More information about the mlpack-git
mailing list