I have a math problem... I want to get saturation function which works like that:
I tried with the following code:
def sat_f(x, A, B, base=1.5):
y = np.power(base, x)
y_max = np.power(base, B)
norm_coeff = A / y_max
y = norm_coeff * y
return y
But I have problem to get f(0) = 1 when it's scaled
CodePudding user response:
Not a python guy, but mathematically what you need is:
f(x) = A^(x/B)
This will give you:
f(0) = 1
f(B) = A
and in-between range the function will grow exponentially w.r.t A
hope this helps