This is just a quick question.

The following an example of a sigmoid function with the form y=(1/(1+e^(-x))):

The following is an example of a gaussian of the form y=e^(-x^2):

I'm looking for a function that basically looks like this:

Such that it approaches 0 three times, one of them being at the origin of the Cartesian plane, as well as approaching 1 at -a/2 and a/2.

Does anyone have any ideas what such a function could be?

## Functions

**Moderators:** gmalivuk, Moderators General, Prelates

### Re: Functions

Can it pass through 0?

she/they

gmalivuk wrote:Yes. And if wishes were horses, wishing wells would fill up very quickly with drowned horses.King Author wrote:If space (rather, distance) is an illusion, it'd be possible for one meta-me to experience both body's sensory inputs.

### Re: Functions

Beyond arbitrary point (a,0) and (-a,0), it can do whatever the hell it wants. The only important thing is that from (a,0) and (-a,0) it looks like the image.

### Re: Functions

Thanks

However, is there one which has a horizontal asymptote at 0? I just realized that I was wrong.

However, is there one which has a horizontal asymptote at 0? I just realized that I was wrong.

### Re: Functions

Can't you just define it piecewise? There's nothing wrong with saying:

For -1 <= x <= 1:

f(x) = sin(pi * x)^2

Otherwise:

f(x) = 0

Old stuff:

For -1 <= x <= 1:

f(x) = sin(pi * x)^2

Otherwise:

f(x) = 0

Old stuff:

**Spoiler:**

http://en.wikipedia.org/wiki/DSV_Alvin#Sinking wrote:Researchers found a cheese sandwich which exhibited no visible signs of decomposition, and was in fact eaten.

### Re: Functions

Radium wrote:Thanks

However, is there one which has a horizontal asymptote at 0? I just realized that I was wrong.

Yes there is. What is this for? What work have you already done on it?

wee free kings

### Re: Functions

This is for the activation function of a neural network. I'm trying to optimize an image recognition neural network, and I'm messing around with some functions.

### Re: Functions

One option is a Chi distribution, for example with k=3, then scaled and shifted to meet your criteria, there’s 4(x/a)

Another is what I’m calling a logarithmic Gaussian, e

^{2}e^{1-4(x/a)²}.Another is what I’m calling a logarithmic Gaussian, e

^{-(ln |2x/a|)²}. Or perhaps, e^{-(ln[4(x/a)²])²}.
Last edited by Qaanol on Sat Aug 27, 2011 3:30 pm UTC, edited 1 time in total.

wee free kings

### Re: Functions

Another idea:

a^2/2 * x^2/((a/2)^4+x^4)

Already scaled to have a maximum of 1 at +-a/2

Edit: My link to WolframAlpha does not work, just copy it with some value a to see a graph.

The nominator and the denominator can get some exponents, so you can use

c*(x^2)^n/(d+x^4)^m with proper c,d for the maxima.

a^2/2 * x^2/((a/2)^4+x^4)

Already scaled to have a maximum of 1 at +-a/2

Edit: My link to WolframAlpha does not work, just copy it with some value a to see a graph.

The nominator and the denominator can get some exponents, so you can use

c*(x^2)^n/(d+x^4)^m with proper c,d for the maxima.

### Re: Functions

mfb wrote:Another idea:

a^2/2 * x^2/((a/2)^4+x^4)

Already scaled to have a maximum of 1 at +-a/2

Edit: My link to WolframAlpha does not work, just copy it with some value a to see a graph.

The nominator and the denominator can get some exponents, so you can use

c*(x^2)^n/(d+x^4)^m with proper c,d for the maxima.

That’s because you needed to use this link to WolframAlpha.

wee free kings

### Re: Functions

These are all awesome, thanks

### Who is online

Users browsing this forum: No registered users and 9 guests