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

Rich Shepard rshepard@appl-ecosys....
Thu Apr 24 18:15:58 CDT 2008


   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 when the inflection point is y=0.5.

   So, let me ask the collective expertise here how to generate the curves
that we need.

   We need to generate bell-shaped curves given a midpoint, width (where y=0)
and inflection point (by default, y=0.5) where y is [0.0, 1.0], and x is
usually [0, 100], but can vary. Using the NumPy arange() function to produce
the x values (e.g, arange(0, 100, 0.1)), I need a function that will produce
the associated y values for a bell-shaped curve. These curves represent the
membership functions for fuzzy term sets, and generally adjacent curves
overlap where y=0.5. It would be a bonus to be able to adjust the skew and
kurtosis of the curves, but the controlling data would be the
center/midpoint and width, with defaults for inflection point, and other
parameters.

   I've been searching for quite some time without finding a solution that
works as we need it to work.

TIA,

Rich

-- 
Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863


More information about the Numpy-discussion mailing list