sigmoid (version 0.3.0)

sigmoid: 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

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataCamp Workspace