[Numpy-discussion] Combining Sigmoid Curves

2008-05-02 Thread Rich Shepard
When I last visited I was given excellent advice about Gaussian and other bell-shaped curves. Upon further reflection I realized that the Gaussian curves will not do; the curve does need to have y=0.0 at each end. I tried to apply a Beta distribution, but I cannot correlate the alpha and

Re: [Numpy-discussion] Combining Sigmoid Curves

2008-05-02 Thread Angus McMorland
2008/5/2 Rich Shepard [EMAIL PROTECTED]: When I last visited I was given excellent advice about Gaussian and other bell-shaped curves. Upon further reflection I realized that the Gaussian curves will not do; the curve does need to have y=0.0 at each end. I tried to apply a Beta

Re: [Numpy-discussion] Combining Sigmoid Curves

2008-05-02 Thread Rich Shepard
On Fri, 2 May 2008, Angus McMorland wrote: How about multiplying two Boltzmann terms together, ala: f(x) = 1/(1+exp(-(x-flex1)/tau1)) * 1/(1+exp((x-flex2)/tau2)) You'll find if your two flexion points get too close together, the peak will drop below the maximum for each individual curve,

Re: [Numpy-discussion] Combining Sigmoid Curves

2008-05-02 Thread Christopher Barker
Rich, this could use some serious vectorization/numpyification! Poke around the scipy Wiki and whatever other tutorials you can find -- you'll be glad you did. A hint: When you are writing a loop like: for i in xL: x.append(xL[i]) You should be doing array operations!

Re: [Numpy-discussion] Combining Sigmoid Curves

2008-05-02 Thread Rich Shepard
On Fri, 2 May 2008, Christopher Barker wrote: this could use some serious vectorization/numpyification! Poke around the scipy Wiki and whatever other tutorials you can find -- you'll be glad you did. A hint: When you are writing a loop like: for i in xL: x.append(xL[i])

Re: [Numpy-discussion] Combining Sigmoid Curves

2008-05-02 Thread Anne Archibald
2008/5/2 Rich Shepard [EMAIL PROTECTED]: What will work (I call it a pi curve) is a matched pair of sigmoid curves, the ascending curve on the left and the descending curve on the right. Using the Boltzmann function for these I can calculate and plot each individually, but I'm having

Re: [Numpy-discussion] Combining Sigmoid Curves

2008-05-02 Thread Rich Shepard
On Fri, 2 May 2008, Anne Archibald wrote: It's better not to work point-by-point, appending things, when working with numpy. Ideally you could find a formula which just produced the right curve, and then you'd apply it to the input vector and get the output vector all at once. Anne,

Re: [Numpy-discussion] Combining Sigmoid Curves

2008-05-02 Thread Anne Archibald
2008/5/2 Rich Shepard [EMAIL PROTECTED]: On Fri, 2 May 2008, Anne Archibald wrote: It's better not to work point-by-point, appending things, when working with numpy. Ideally you could find a formula which just produced the right curve, and then you'd apply it to the input vector and get

Re: [Numpy-discussion] Combining Sigmoid Curves

2008-05-02 Thread Christopher Barker
Anne Archibald wrote: 2008/5/2 Rich Shepard [EMAIL PROTECTED]: No, no. You *want* scaled_x to range from -1 to 1. Why not just scale to -pi to pi right there? (The 0.998 is because you didn't include the endpoint, 100.) Which is why you want linspace, rather than arange. Really, trust me on

Re: [Numpy-discussion] Combining Sigmoid Curves

2008-05-02 Thread Rich Shepard
On Fri, 2 May 2008, Christopher Barker wrote: Why not just scale to -pi to pi right there? Dunno, Chris. As I wrote to Anne (including a couple of files and the resulting plot), it's been almost three decades since I dealt with the math underlying distribution functions. Which is why you