sigmoid {sigmoid} | R Documentation |
Sigmoid
Description
computes sigmoid nonlinearity
Usage
sigmoid(
x,
method = c("logistic", "Gompertz", "tanh", "ReLU", "leakyReLU"),
inverse = FALSE,
SoftMax = FALSE,
...
)
Arguments
x |
numeric vector |
method |
type of sigmoid function |
inverse |
use the inverse of the method (reverses) |
SoftMax |
use SoftMax preprocessing |
... |
arguments to pass on the method |
Examples
# create input vector
a <- seq(-10,10)
# use sigmoid with default standard logistic
( b <- sigmoid(a) )
# show shape
plot(b)
# inverse
hist( a - sigmoid(b, inverse=TRUE) )
# with SoftMax
( c <- sigmoid(a, SoftMax=TRUE) )
# show difference
hist(b-c)
[Package sigmoid version 1.4.0 Index]