nasa / bingo

Apache License 2.0
47 stars 28 forks source link

relative error for fitness function #33

Closed arovinelli closed 4 years ago

arovinelli commented 4 years ago

Hi there I'm a new bingo user, sometimes, especially when the value of the fitness function vastly varies, it useful to have relative errors. I saw there are different errors definition, so this functionality might just be added there. or simply when evaluating the fitness function.

Best regards and thanks for the great tool.

gbomarito commented 4 years ago

thanks for the issue. quick clarifying question: Are you suggesting relative errors (a) where each datapoint is normalized by its target value or (b) where the final fitness is normalized by some aggregate measure of all the datapoints (like an average)

arovinelli commented 4 years ago

Hi there, definitely case (a). Normalizing each data-point by it's own target value allows to treat cases in which one wants to have the best percentage error.

gbomarito commented 4 years ago

the feature is now live on the develop branch. ExplicitRegression(..., relative=True)

just be careful with training data with near 0 y values ;)