sigmoid | R Documentation |
computes sigmoid nonlinearity
sigmoid( x, method = c("logistic", "Gompertz", "tanh", "ReLU", "leakyReLU"), inverse = FALSE, SoftMax = FALSE, ... )
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 |
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.