-
Notifications
You must be signed in to change notification settings - Fork 76
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
How can I add functions such as SQRT, EXP, X^2, POW, INV, LN in my code of Gene Expression Programming #28
Comments
The main reason is that many functions you mentioned are some kind of dangerous. That is, it is easy to generate unreasonably large (such as Just like we usually define a protected version for
Since evolution is always random, you cannot assume reasonable inputs or outputs for a given function. Instead, protect it. |
Thank you for your quick response and the clarification! |
Hi Shuhua; (Numerical expression inference problem: numerical constant finding with ephemeral numerical constant (ENC)) There is only the single input 'x' and random numerical constants (RNC). x ( date from 2.3 to 6.5) How to implement the code and do I need to change the code to be like this: n_cases = 100 Y = f(X1,X2,X3) + np.random.normal(size=n_cases) # Gaussian noise Also, do I need to change the random range to be (2.3 to 6.5), (0.25 to 3) and (1 to 99) regards |
Hi, I cannot add the above mentioned functions functions. If I add function such as
pset.add_function(operator.pow,2)
then the following things return;
:1: RuntimeWarning: overflow encountered in double_scalars
Traceback (most recent call last):
File "G:/My Drive/Afifa Tamanna/PhD/AI/GEP/Diffn_Analysis_GEP_model/Analysis/testviscosity.py", line 198, in
pop, log = gep.gep_simple(pop, toolbox, n_generations=n_gen, n_elites=1,
File "C:\Program Files (x86)\Python38-32\lib\site-packages\geppy\algorithms\basic.py", line 100, in gep_simple
for ind, fit in zip(invalid_individuals, fitnesses):
File "<array_function internals>", line 5, in lstsq
File "C:\Users\atam0001\AppData\Roaming\Python\Python38\site-packages\numpy\linalg\linalg.py", line 2259, in lstsq
x, resids, rank, s = gufunc(a, b, rcond, signature=signature, extobj=extobj)
File "C:\Users\atam0001\AppData\Roaming\Python\Python38\site-packages\numpy\linalg\linalg.py", line 109, in _raise_linalgerror_lstsq
raise LinAlgError("SVD did not converge in Linear Least Squares")
numpy.linalg.LinAlgError: SVD did not converge in Linear Least Squares
Please assist me in solving the issue. Many Thanks.
The text was updated successfully, but these errors were encountered: