Learn R Programming

tsaux (version 1.0.0)

sigmoid: The sigmoid transformation

Description

The sigmoid function is a smooth, S-shaped function that maps any real-valued input into a bounded interval, typically (0,1) . It is widely used in probability modeling, logistic regression, and neural networks as an activation function.

Usage

sigmoid(lower = 0, upper = 1, ...)

Value

A list with the transform and inverse functions.

Arguments

lower

lower bound of the variable.

upper

upper bound of the variable.

...

not currently used.

Author

Alexios Galanos

Examples

Run this code

y = cumprod(c(1, 1 + rnorm(100,0.01, 0.005)))
B = sigmoid()
yt = B$transform(y)
ye = B$inverse(yt)

Run the code above in your browser using DataLab