Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replicating GANN regression examples. #218

mjcallaway started this conversation in General
Discussion options

Hi, I've tried running the code for the two regression examples in the documentation here:
https://pygad.readthedocs.io/en/latest/gann.html#examples

but a typical fitness value plot is not as expected, being much worse than those shown; predictions are also very poor and errors are large. Am I missing something, or have the plots in the documentation been specially selected and are not typical outputs?

Regression Example 1 output
image
Predictions of the trained network : [array([0.33516124]), array([1.38754763])]
Absolute error : 0.7.

Regression Example 2 output

image
Absolute error : 290.8024640876485.

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

Hi @mjcallaway,

For the first example, the code published in the documentation is not updated. Please use the code in this script: https://github.com/ahmedfgad/GeneticAlgorithmPython/blob/master/examples/gann/example_regression.py. The documentation will be updated soon.

For the second example (fish classification), I tested it and the fitness does not pass 0.0034. But maybe the result posted at the documentation is reached after making some changes in mutation or initial population. Not sure yet to be honest.

You must be logged in to vote
1 reply
Comment options

Hi @ahmedfgad,

Thanks for your reply and pointing me to the updated script.

Also, thanks for writing this useful library :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right

AltStyle によって変換されたページ (->オリジナル) /