Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example for regression with multiple genomes #230

Merged
merged 1 commit into from
Aug 13, 2020

Conversation

mschmidt87
Copy link
Member

This PR adds an example for multiple regression. It is based on example_minimal.py and modifies the target function to be piecewise defined.

@mschmidt87 mschmidt87 requested a review from jakobj August 11, 2020 13:23
@mschmidt87 mschmidt87 added this to the 0.2.0 milestone Aug 11, 2020
Copy link
Member

@jakobj jakobj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work! ✨

added a few minor comments

examples/example_multi_genome.py Outdated Show resolved Hide resolved
examples/example_multi_genome.py Outdated Show resolved Hide resolved
examples/example_multi_genome.py Show resolved Hide resolved
examples/example_multi_genome.py Outdated Show resolved Hide resolved
examples/example_multi_genome.py Outdated Show resolved Hide resolved
Copy link
Member

@jakobj jakobj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just two minor suggestions, otherwise i'm happy 👍

please squash before merging

Comment on lines 32 to 33
# transformations to the input depending whether the input is less or greater
# than zero. We thus need to fit two different functions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# transformations to the input depending whether the input is less or greater
# than zero. We thus need to fit two different functions.
# transformations to the input depending whether the input is less than zero or not.
# We thus need to fit two different functions.

or some other formulation to include "equal to zero"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks done.



# %%
# After finishing the evolution, we plot the result.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it would be nice here to print the expressions encoded in the individual?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, thanks, added it.

@mschmidt87 mschmidt87 merged commit 5deb680 into master Aug 13, 2020
@mschmidt87 mschmidt87 deleted the example/multi_genome branch August 13, 2020 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend documentation to cover more aspects of the API and examples
2 participants