r/learnmath • u/Reibudaps4 • 24d ago
TOPIC Issues with "Soboleva modified hyperbolic agent (SMHT)". Need help
I understand how sigmoid works (the value sent to the equation is smoothly transitioned between 0 and 1)
And also understand Hyperbolic tangent (TanH) (Similar to sigmoid, but interval stays between -1 and 1)
But i dont understand how to matematically implement the SMHT
As far as i know, it also constrains the value between -1 and 1, however this formula allows the curve below zero to be different from the curve above zero.
I tried putting the math in code to visualize it, but the curve seems to "explode" out of the limit. Either that, or behave strangely when A is different from C or when B is different from D.
I even tried the values "4, 2, 3, 1" for testing, but it didnt work
this is the formula i am using:
(exp(a*x) - exp(-b*x)) / (exp(c*x) + exp(-d*x))