Closed lacava closed 3 years ago
Sure.
It does: my_div(a,b) := pseudosign(b) * (a / (abs(b) + epsilon) ), where pseudo-sign(b) is sign(b) if b!=0, else 1. Of course epsilon > 0.
Same thing, as an img for readability:
This way it looks like a division unless b goes to 0, in which case it basically caps to a very large (if b ~ 0 and positive) value (namely, 1/epsilon), or a very small one (if b ~ 0 and negative, namely -1/epsilon).
I started using it in my recent works, like these: https://arxiv.org/abs/2009.06037 https://www.springerprofessional.de/en/learning-a-formula-of-interpretability-to-learn-interpretable-fo/18338610
got it, thanks. that makes sense. I'm still confused by the modulo operator. is it overloaded somewhere?
Oh, that is elementwise multiplication between armadillo vectors
great. thank you!
https://github.com/marcovirgolin/GP-GOMEA/blob/894fd841daee98a0a08de0a6a82a595fcd985b15/src/Include/GPGOMEA/Operators/Regression/OpNewProtectedDivision.h#L33
can you help me understand how this protected division operator works?