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?

$\endgroup$
3
$\begingroup$

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.

| cite | improve this answer | |
$\endgroup$
  • 2
    $\begingroup$ There's also the arctangent, the hyperbolic tangent, and if you're feeling cocky enough, the error function... ;) $\endgroup$ – J. M. isn't a mathematician Nov 6 '10 at 15:15
  • $\begingroup$ This is the approach I ended up using, but with some amplification to keep the range neat. $\endgroup$ – Tom Wright Dec 12 '11 at 16:19
1
$\begingroup$

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.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.