3
$\begingroup$

For a mapping algorithm I'm working on, I'm trying out the effect of sigmoid weightings.

Right now I'm using $$y = \frac{1}{1+x^n}$$ where n is the steepness of the sigmoid function.

This graph shows values of x between 0 and 256 and the following values of n: 2, 4 and 32. X values have been scaled to a range of -10 to 10. Also plotted is equivalent $y=x$ line.

alt text

The effect I would like to achieve is a function that lies somewhere between the $y=x$ and the $n=2$ functions. When I set n to be between 1 and 2 however, the location of the asymptotes changes.

How can I use values of n such that $1 < n < 2$ and keep the asymptotes at 0 and 1?

2 Answers 2

3

You can also use $y = \frac{1}{1+ax^n}$ to give yourself another parameter to play with. It will still go from 0 to 1 as x goes from -infinity to infinity, but you can change how quickly it gets close.

  • 2
    There's also the arctangent, the hyperbolic tangent, and if you're feeling cocky enough, the error function... ;)2010-11-06
  • 0
    This is the approach I ended up using, but with some amplification to keep the range neat.2011-12-12
1

I think it would help if you quantified what you mean by the location of the asymptote. In your graph, it looks like $y$ takes on the values 0 or 1 at different places for different values of $n$, but $y \ne 0$ for any $x > 0$ and $y \ne 1$ for any finite $x$ no matter the value of $n>0$. You could define the location of the asymptotes, for example, as the values of $x$ where $y$ equals 0.001 and 0.999. Or you could define the locations of the asymptotes as places where the derivative $y'$ equals 0.001, for example.