sigmoid | R Documentation |
Returns S-shaped functions, monotonically increasing between two constants with a point symmetry at the half-way point.
sigmoid(x, type = 1, fmin = 0, fmax = 1, xmid = 0, slope = 1)
x |
real argument between -Inf and +Inf, can be a vector |
type |
number or character string, specifying the type of function. The following expressions vary between -1 and +1 with a slope of 1 at the symmetry x=0. |
fmin |
asymptotic function minimum at |
fmax |
asymptotic function maximum at |
xmid |
point of symmetry, where the function value is |
slope |
slope of the function at |
Returns a vector with the same number of elements as x
Danail Obreschkow
col = c('red','orange','#cccc00','#00bb00','blue','purple')
for (i in seq(6)) {
graphics::curve(sigmoid(x,i),-3,3,add=i>1,col=col[i],ylab='sigmoid(x)')
}
graphics::lines(c(-1.5,1.5),c(-1,2),lty=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.