It is well known that many sigmoid functions are approximately linear around x=0. I am looking for a sigmoid function that has a parameter that controls the length of this segment. I want to measure the length of this segment by its projection onto the y axis. Edit: The sigmoid function should map to the interval [-1, 1] on the y axis, so it is about which portion of this is linear. Additionally, the gradient at 0 should be 1.
In this image from Wikipedia I would consider erf as the most linear and x / (1 + |x|) the least linear:
In the extreme linearity case I want the function to converge to being -1 for x<=1, x for -1<x<1 and 1 for x>1.