sigmoid: Sigmoid

Description Usage Arguments Examples

Description

computes sigmoid nonlinearity

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# 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)

sigmoid documentation built on May 2, 2019, 11:27 a.m.