Sometimes objective functions behave badly and do not return friendly types...
My personal thinking is that the default invalid fitness should be None and that all other types np.nan, np.inf, strings etc. should all be cast to None and then have the selection algorithms be aware of this.
A simple way to do this is to wrap the objective function in something that filters the return?
Need to also make sure that the selection algorithms are ok to handle None values for fitness. For example what to do in the None vs. None case?
Sometimes objective functions behave badly and do not return friendly types...
My personal thinking is that the default invalid fitness should be
None
and that all other typesnp.nan
,np.inf
, strings etc. should all be cast toNone
and then have the selection algorithms be aware of this.A simple way to do this is to wrap the objective function in something that filters the return?
Need to also make sure that the selection algorithms are ok to handle
None
values for fitness. For example what to do in theNone
vs.None
case?