You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This protected division is defined to avoid dividing by zero.But how can it be used when you predict the aim value with the target function you've got by GEP. I've got many 'inf' in my prediction.And this is caused by the real division when using 'eval' to calculate. I am new in GEP. Do you know how does the GEP algorithm solve the division?
The text was updated successfully, but these errors were encountered:
Hi. If you have got many 'inf', one possible reason is that your model during evolution has generated very huge values. Can you confirm that it is produced by protected_div? If so, you should change protected_div to limit the value of the result. For example,
defprotected_div(x1, x2):
ifabs(x2) <1e-8:
return1# anything you liker=x1/x2ifr>1e8:
return1000# anything you likeelifr<-1e8:
return-1000returnr
Other causes may be computations like log when the input is very close to 0.
Hi,I am writing a thesis with GEP. Thanks for your project and I found a problem when using the examples.
This protected division is defined to avoid dividing by zero.But how can it be used when you predict the aim value with the target function you've got by GEP. I've got many 'inf' in my prediction.And this is caused by the real division when using 'eval' to calculate. I am new in GEP. Do you know how does the GEP algorithm solve the division?
The text was updated successfully, but these errors were encountered: