From 77e526e3c8888358c2c9c96d26f48fb2d3f4e7cc Mon Sep 17 00:00:00 2001 From: Shuhua Gao Date: Sun, 4 Oct 2020 16:53:46 +0800 Subject: [PATCH] update readme for protected functions --- README.MD | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.MD b/README.MD index d7ce34d..09cddaa 100644 --- a/README.MD +++ b/README.MD @@ -64,6 +64,11 @@ A getting started example is presented in the Jupyter notebook [Boolean model id - [optional] To visualize the expression tree using the `geppy.export_expression_tree` method, you need the [graphviz](https://pypi.org/project/graphviz/) module. - [optional] Since GEP/GP doesn't simplify the expressions during evolution, its final result may contain many redundancies, and the tree can be very large, like `x + 5 * (2 * x - x - x) - 1`, which is simply `x - 1`. You may like to simplify the final model evolved by GEP with symbolic computation to get better understanding of this model. The corresponding `geppy.simplify` method depends on the [sympy](http://www.sympy.org/en/index.html) package. +## Common pitfalls in using GP +Always keep in mind that evolution is random. Thus, any values may be input into a function. If issues like "overflow", "nan", or "not a number", or unreasonally huge values are encounterred, the most possible reason is that you did not protect a possibly _dangerous_ function. For example, if the `sqrt` function lies in the function set, then in evaluating one individual evolved by `geppy` (or GP in general), it is likely that a negative input `sqrt(-1.24)` happens. + +Refer to issues #28 #26 #4 for more details. + ## Reference The bible of GEP is definitely Ferreira, C.'s monograph: **Ferreira, C. (2006). Gene expression programming: mathematical modeling by an artificial intelligence (Vol. 21). Springer**.