Re: [Numpy-discussion] Generating Bell Curves (was: Using normal() )

2008-04-25 Thread Rich Shepard
On Thu, 24 Apr 2008, Keith Goodman wrote: A Gaussian never reaches zero. Keith, I know, and that's why I need to find another way to draw these curves. While mathematically any 'y' value 0.2 (the default) is equivalent to zero, the curves must reach zero in the figures. Briefly, this

Re: [Numpy-discussion] Generating Bell Curves (was: Using normal() )

2008-04-25 Thread David Huard
Other suggestions for bounded bell-shaped functions that reach zero on a finite interval: - Beta distribution: http://en.wikipedia.org/wiki/Beta_distribution - Cubic B-splines:http://www.ibiblio.org/e-notes/Splines/Basis.htm 2008/4/25 Bruce Southey [EMAIL PROTECTED]: Rich Shepard wrote:

Re: [Numpy-discussion] Generating Bell Curves (was: Using normal() )

2008-04-25 Thread Rich Shepard
On Fri, 25 Apr 2008, David Huard wrote: Other suggestions for bounded bell-shaped functions that reach zero on a finite interval: - Beta distribution: http://en.wikipedia.org/wiki/Beta_distribution - Cubic B-splines:http://www.ibiblio.org/e-notes/Splines/Basis.htm Thanks, David. I'm

Re: [Numpy-discussion] Generating Bell Curves (was: Using normal() )

2008-04-25 Thread Anne Archibald
On 24/04/2008, Rich Shepard [EMAIL PROTECTED] wrote: Thanks to several of you I produced test code using the normal density function, and it does not do what we need. Neither does the Gaussian function using fwhm that I've tried. The latter comes closer, but the ends do not reach y=0

Re: [Numpy-discussion] Generating Bell Curves (was: Using normal() )

2008-04-25 Thread Rich Shepard
On Fri, 25 Apr 2008, Robert Kern wrote: In that case, you need to search the literature of your field for precise details on how to construct the curve that you want. Robert, Considering how few of us work in this subject area there's not much in the way of resources. Regardless, for

Re: [Numpy-discussion] Generating Bell Curves (was: Using normal() )

2008-04-25 Thread Rich Shepard
On Fri, 25 Apr 2008, Bruce Southey wrote: Just use a truncated distribution as these are well known: http://en.wikipedia.org/wiki/Truncated_distribution http://en.wikipedia.org/wiki/Truncated_normal_distribution Bruce, I considered the truncated normal distribution, but having the tails

Re: [Numpy-discussion] Generating Bell Curves (was: Using normal() )

2008-04-25 Thread Rich Shepard
On Fri, 25 Apr 2008, Charles R Harris wrote: You can use something like f(x) = (1-x**2)**2 , which has inflection points and vanishes at +/- 1. Any of the B-splines will also do the trick. Chuck, Thank you. I need to make some time to understand the B-splines to use them appropriately.

Re: [Numpy-discussion] Generating Bell Curves (was: Using normal() )

2008-04-25 Thread Gael Varoquaux
On Fri, Apr 25, 2008 at 01:41:14PM -0500, Robert Kern wrote: As Anne notes, bell-shaped curve, while seemingly generic, usually specifies Gaussians, and Gaussians do not have the properties you need. There are any number of curves which we could (and have) suggested as looking bell-shaped,

Re: [Numpy-discussion] Generating Bell Curves (was: Using normal() )

2008-04-25 Thread Charles R Harris
On Fri, Apr 25, 2008 at 1:25 PM, Rich Shepard [EMAIL PROTECTED] wrote: On Fri, 25 Apr 2008, Charles R Harris wrote: You can use something like f(x) = (1-x**2)**2 , which has inflection points and vanishes at +/- 1. Any of the B-splines will also do the trick. Chuck, Thank you. I need

Re: [Numpy-discussion] Generating Bell Curves (was: Using normal() )

2008-04-25 Thread Hoyt Koepke
Another suggestion from machine learning stuff to throw into the mix: A soft step function that we use often is y = e^(ax) / ( 1 + e^(ax)). It has the nice property that the result y is always in (0,1). If you invert this, you get x = -(1/a)*log(y - 1); this maps (0,1) to the whole real line,