I’m looking for a gain function, for range 0-1, where the output goes from 0-1 but at different pace.
Sure there are plenty of Log, Squares, sigmoids, tanhs but I was looking for something more flexible, and the I thought of the Bézier curves, for example:
where four parameters allow almost any curve.
Especially useful are the ones where the second set of parameters are symmetric, where it covers logit, square logit, symlog, and all the possible intermediary curves.
The Béziers for 4 points are:
$$P(t) = (1−t)^3P_1 + 3(1−t)^2tP_2 +3(1−t)t^2P_3 + t^3P_4 \
So to make the gain function, I would need to express Y on base of Y, and as the point 1 in our case is (0,0), and point 4 is (1,1) and P2 and P3 will be our input parameters (as the cubic-bezier.com examples) . So I could write:
X = Xa*3(1−t)^2*t + Xb*(1−t)*t^2 + t^3
Y = Ya*3(1−t)^2*t + Yb*(1−t)*t^2 + t^3
Clear t in the first, substitute in the second, and we will have:
- f(x) = y = (¿Xa,Xb,Ya,Yb?)·x
But this goes beyond my capabilities :_((
Can anybody help me?
I want to implement this either on excel, python, or desmos:
PD: sorry, I think I asked in wrong forum, I hope the math.stackexchange.com is the right one, I am not sure if I should delete this one.