Talk:Sigmoid function

message: Call me crazy, but since when is the Hyperbolic_cosine considered "S shaped"?  If this is a typo, I'm not sure what other function it was supposed to be.  --65.147.0.105 15:25, 28 May 2004 (UTC)
thread_title: Untitled

message: Do you really mean "local minimum" and "local maximum"?  The example function given clearly doesn't have any local minima or maxima (but it does have a global minimum of 0 and a global maximum of 1) -- Somebody
Perhaps what is meant is that the second derivative (curvature) has a local minimum and maximum? BTW, I do not agree that the function has global extrema, because as I learned them and as the article on them states, they are points in the domain of the function and are always also local extrema. This function has none. The image of the function has supremum of 1 and infimum of 0, though (ie. the asymptotes of this function are y=0 and y=1). 82.103.198.180 10:03, 23 July 2006 (UTC)
thread_title:  local extrema? 

message: I'd like to add a gallery of sigmoid-like curves to this article. The hemoglobin example is a nice one. Any others? --HappyCamper 17:22, 30 March 2007 (UTC)
replies: text: I am adding an example that includes "most" of the sigmoids having a closed-form equation. Hope that it is of interest and is not seen as COI. This is my very first Wikipedia edit, if I am doing something inappropriate please remove or modify. Dasomath (talk) 20:10, 15 July 2022 (UTC)
thread_title:  Examples 

message: I see that someone changed the image size recently in order to avoid resolution problems.
Maybe the image should be replaced after all with the almost identical vector image ?--Hagman-de 15:53, 16 June 2007 (UTC)
thread_title:  Image 

message: I've used the sigmoid function on and off, for a long time (about 8 years), and what I use is of course similar to what is presented here, but I would suggest adding two elements into the definition -- a "gain" or "sharpness" factor "k" or "g" -- and a "threshold" or "slider" term that allows the function to be "slid" back and forth across the X-axis:
:: Y(t) = 1/(1 + e(k*(X - thr))
The neat thing about this more expanded definition is the following:
* The "gain" at X = "thr", is the derivative of course, but it is 1/4 the value of k (as I remember)
* The curve can be "flipped around" by changing the sign of k; thus the sigmoid can be made to act like a Boolean NOT if "thr" is 0.5 and k is positive,
:: You see the failure of "the law of excluded middle" (LoEM) -- no matter how huge the k, the value of the function at X = "thr" = 0.5. This violates the LoEM.
* You can build e.g. an OR gate by adding X1 and X2, subtracting "thr" = 0.5 and then squashing the sum with the sigmoid:
    
:: OR(X1, X2) = 1/(1 + e(-12*(X1 + X2 - 0.5)))
* Given that you can build an OR and a NOT you now can approximate any Boolean function.
* Similarly, in a plane, the value of Z(t) will be 0.5 all along a line (it looks like a folded plane)
*: From Y = mX + b, 
*: Y/b + (m/b)*X = 0
*: Z(t) = sig(Y/b + (m/b)*X - thr)
*Two of the above Z(t) but with reversed signs and slightly offset with different thresholds added together make a line, like a mountain range on a map, or a canyon. However, If you put three of these plateaus i.e. "folded sheets" (for a total of just 3 sigmoids) on the X-Y plane and get the signs of their k's right, add them together and pass them through a "second-layer" sigmoid you have a "triangle" that can be shrunk with higher values of k's make a single Matterhorn stick up anywhere on the plane (or make a sink-hole).
*Given that you can make Matterhorns to your heart's content anywhere on the plane, you can add them together and approximate any curve by "bleeding" one into another. This summation proves that sigmoids can be used to approximate any arbitrary curve, much like a 2-D Fourier transform.
Some of this stuff can be found in a book titled:
:Tom M. Mitchell, Machine Learning, WCB-McGraw-Hill, 1997, 
In particular see "Chapter 4: Artificial Neural Networks" where the Boolean abilities of "perceptrons" are defined as well. I happened onto the tricky business of adding three folded planes together to make a "triangle" (and passing them through a second-layer sigmoid) because a neural net showed me this (!). I've not seen it documented anywhere, but I did see the results of it in a journal once. I'm sure someone who knows the literature better could cite the source. Proofs similar to the above are mentioned in Mitchell. This stuff is easy to do in Excel. wvbaileyWvbailey 18:39, 17 June 2007 (UTC)
thread_title:  a slightly more useful definition? 

message: I wonder if it would be useful to list the following function among the sigmoids:
f(x) = 3x^2-2x^3, \quad x \in [0,1]
I have seen it used as a "hack" when a fast S-shaped function was needed, avoiding the (computer) evaluation of exp(x). Its derivative is flat at 0 and 1, and it is symmetrical with respect to the midpoint (meaning, f(1-x) = 1-f(x)). For many purposes it works fine, as long as you don't run outside the range [0,1].  —Preceding unsigned comment added by Pasmao (talk • contribs) 12:44, 27 October 2007 (UTC)
replies: text: It would be interesting to add something like this. I fiddled with this notion with respect to what would be required for mother nature to  build a squasher for making neuralogical ANDs and ORs, and was able to get to some pretty nice approximations -- as long as you stay within the interval. Somewhere I actually worked out the math for this ... a problem arises because, to be useful, the AND etc needs some "gain" in the middle (i.e. a slope > 1) but the more gain you put in the more difficult the design becomes. For an OR you need a range of -0.25 to +2.25 (i.e. if inputs are "a" and "b" that vary from 0 to 1, add them and squash their sum back to approximately 0 or 1). The first hack starts out with the odd function y = 1*(x-0.5) + 0.5 (just a straight line shifted to the right: yielding (0,0), (1,1) ). This clearly won't work. The trick then is to feedback a certain amount of x2 to give you some "gain", etc, etc. As I remember this works best if it goes through two iterations. I'm working from memory here... bill Wvbailey (talk) 17:18, 13 January 2008 (UTC)
thread_title:  Another sigmoid? 

message: I'm pretty sure that not all sigmoid functions have the derivative: 
\frac{dP}{dt}=P(1-P).
Perhaps a minor clarification would be in order.  —Preceding unsigned comment added by 128.111.110.55 (talk) 02:12, 11 December 2007 (UTC)
replies: text: 1/(1-exp(-x)) is not even the special case of the logistic function mentioned in the text. How the reader could know what function the formula applies to. This part of the text is very confusing.130.234.198.85 (talk) 14:36, 7 January 2008 (UTC)
thread_title:  Derivative Clarification 

message: An external link that has been in this page for a good while  points to a very useful implementation of the model in Excel.  I've found the author moved the site so the link redirects to 
I tried to update and now a user MrOllie has been deleting this edit, pointing to WP:EL (policy on external links)
I appreciate his point, as in many topic of opinion, blogs are not an authoritative source.  As this article is about math, I can't see the difference between the resource  and .  Both describe in further detail the logistic curve and show someone interested how to implement it.  I find the Excel version very useful and relevant, and from comments in , some other people find it useful as well.  Would like to see other members opinions
218.82.217.162 (talk) 17:46, 31 October 2008 (UTC)
thread_title:  External link to Logistic Function implementation in Excel should be maintained 

message: the following is called a "sigmoidal function" in another article:
σ(x)=2/(1+e^{-ax})-1
Is ok to create a sigmoidal function redirect to this article? Or are they different things?   walk victor falk talk 02:16, 15 February 2011 (UTC)
replies: text: Sigmoidal and sigmoid seem to me as they are the same thing; maybe there is some very slight difference but it's not pointed out by the article. --Kri (talk) 00:38, 16 February 2011 (UTC)
thread_title: Sigmoid and sigmoidal

message: Currently the section "Definition" says
:A sigmoid function is a bounded differentiable real function that is defined for all real input values and has a positive derivative at each point.
but then in the very next sentence the section "Properties" says
:In general, a sigmoid function is real-valued and differentiable, having either a non-negative or non-positive first derivative which is bell shaped.
So the article is inconsistent as to whether it must be upward sloping or whether it can alternatively be downward sloping, and (if downward sloping is precluded) as to whether it must have a positive or just a non-negative derivative.  Duoduoduo (talk) 14:15, 2 November 2013 (UTC)
thread_title:  Sign of first derivative 

message: This page is missing a separation of symmetrical and asummetrical sigmoid functions , e.g. the Gompertz function is an asymmetric sigmoid 
http://en.wikipedia.org/wiki/Gompertz_function 
but there are many others. 
Olbran (talk) 10:50, 17 March 2015 (UTC)
thread_title:  asymmetric sigmoid function 

message: The Properties section should be consistent with the Definition section. The Definition says that the derivative must be positive. The Properties section says that it must be either non-positive or non-negative. It's unnecessary anyway to restate properties that are explicit in the definition (other properties that can be derived from the definition should be mentioned), but it's unhelpful at least to be inconsistent.  — Preceding unsigned comment added by 209.93.31.116 (talk) 17:20, 29 April 2017 (UTC)
thread_title:  Definition and properties not consistent 

message: I've found this page quite useful in my work in the statistics of vaccines research, especially the illustration of the six normalized functions, but agree it needs major clean up. Separate pages would be preferable for symmetrical sigmoid functions, of which there are probably only a limited number of known algebraic examples, and asymmetrical sigmoid functions, of which there must be quite a few more. Separating out those which have non-zero first derivatives on the whole domain –  \pm \infty – from those which do not would also be advantageous, since any function which has a zero gradient at a couple of points can be converted into a sigmoid function by appropriately segmenting the domain, e.g. the Smoothstep, so these would be better grouped elsewhere. Also, functions that simply shift or rescale other functions could be consolidated – e.g. the hyperbolic tangent and logistic. Surely there must be pages somewhere on how to shift and rescale functions for those who wish to know how to do this.
Some recent work introduced a generalized symmetrical sigmoid function
f(x) = \frac{x}{(1 + |x|^{k})^{1/k}}
where k is a shape parameter governing how fast the curve approaches the asymptotes for a given slope at the inflection point. When k=1 the function is the 'absolute sigmoid function' shown in the illustration, and when k=2 the function is the 'square root sigmoid function'; when k=1.5 the function approximates the arctangent function, when k=2.9 it approximates the logistic function, and when k=3.4 it approximates the error function.. This should be considered for inclusion.
Finally, I promise to come back and clean up this page as soon as I've finished my research on the statistics of vaccines research :). Adunning2 (talk) 02:22, 19 July 2018 (UTC)
thread_title:  Generalized symmetrical sigmoid function 

message: Are private websites in images allowed, like the one in this page? Is it not considered a kind of subtle advertisement?  — Preceding unsigned comment added by Raffamaiden (talk • contribs) 15:47, 3 April 2019 (UTC)
thread_title:  Website in the image 

message: As it stands now, the article apparently flips between talking about sigmoid functions as members of a class of functions with "S"-shaped graph in general and talking about the logistic function as a specific example. Frankly, I would just remove the section Sigmoid function#Approximate inverse as it talks about the logistic function specifically. (And is unsourced anyway.) – Tea2min (talk) 05:48, 16 June 2020 (UTC)
replies: text: , also rolling back the organizational change.  Hopefully I didn't clobber anything else in the middle, apologies if so. –Deacon Vorbis (carbon • videos) 14:13, 16 June 2020 (UTC)
thread_title:  "A sigmoid function" vs. "The sigmoid function" 

message: The following Wikimedia Commons file used on this page or its Wikidata item has been nominated for deletion:
* 
Participate in the deletion discussion at the . —Community Tech bot (talk) 20:25, 11 September 2021 (UTC)
thread_title:  A Commons file used on this page or its Wikidata item has been nominated for deletion 

message: The article claims "A sigmoid function is a bounded, differentiable, real function [...]" whereas Logit#Comparison_with_probit states "The logit and probit are both sigmoid functions [...]". I don't think both of these statements can be true because logit and probit are unbounded. I noticed the reference cited for the sentence claiming the "bounded" restriction is from Lecture Notes in Computer Science in the article "From Natural to Artificial Neural Computation" so I suspect this definition is likely to be domain-specific. Should the "bounded" restriction be removed or qualified here?
Raoouul (talk) 14:12, 3 March 2022 (UTC)
thread_title:  Is the "bounded" restriction generally accepted?