0
$\begingroup$

I am looking for a function for a double s-curve.

I am using hyperbolic tan function for an S-curve, however, I would like to have a function that has two ranges of higher slope and three ranges of lower slope. To have better classification in three classes. Double S-Curve

1 Answers 1

0

I suggest $$ f(x, a, b) = A \arctan(q(x-a)) + A \arctan(r(x-b)) $$ where as a stating point you can pick $A = q = r = 1$. The outputs will then range from $-\pi$ to $\pi$. If you pick $A = \frac{1}{\pi}$, it'll get you outputs from $-1$ to $1$. The factors $q$ and $r$ say how steep the slopes at the steep bits are. If $a - b$ is small, you'll need to make $q$ and $r$ quite large to avoid having the two "slope-y bits" combine into one.