I have looked at the documentation for the NEAT Python API found here, but it shows calculus like this:

The error for each genome is $1-\sum_i(e_i-a_i)^2$

I haven't learned calculus at the moment. So, can someone please explain what the calculation means?

  • $\begingroup$ Hi and welcome to this community! This website is better suited for more specific questions. For example, you could ask a question regarding a specific concept regarding NEAT. $\endgroup$ – nbro Apr 19 at 14:09
  • $\begingroup$ @nbro Thanks! I have added more on what concepts are confusing me the most in a recent edit. $\endgroup$ – A Twizzler Apr 19 at 14:59
  • $\begingroup$ I removed the rest of the post. I think the link to the Python API is not correct. $\endgroup$ – nbro Apr 19 at 15:08
  • $\begingroup$ @nbro the link doesn't work or the source is wrong? $\endgroup$ – A Twizzler Apr 19 at 15:28
  • 1
    $\begingroup$ Maybe this page? The explanation is in the text, though. $\endgroup$ – Philip Raeisghasem Apr 19 at 18:18

The Sigma means that they take a sum of the squared difference of each pair of expected/predicted values (e) and actual values (a)

1 - that gives them an error metric of how far off they are from their desired result. The goal is generally to optimize the algorithms against such an error function, in this case, to get it as close to one as possible.



$\sum$ - there just means sum. It is greek letter for S. You can rewrite the above formula as

$1 -[(e_1 - a_1)^2+(e_2-a_2)^2+(e_3-a_3)^2+\ldots ]$

$\sum$ just helps us avoid writing dozens of $+$ signs. Read more here.

What they are doing here is subtracting taking difference of expected value $e_1$ and the actual value $a_1$ for the 1st example and so on. The difference can be positive ($e_1 > a_1$) or negative ($e_1 < a_1$), so usually we square the difference to make it positive number.

The rest is there in the docs. Try putting in concrete imagined values for $a_i$ and $e_i$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.