sigmoid.inv: Inverse sigmoid function and gradient

Description Usage Arguments Details Value Examples

Description

Inverse sigmoid function and gradient

Usage

1
sigmoid.inv(x, lower.limit = 0, upper.limit = 1)

Arguments

x

Point to evaluate inverse sigmoid function and gradient

lower.limit

Lower limit of the sigmoid function; defaults to 0

upper.limit

Upper limit of the sigmoid function; defaults to 1

Details

Evaluates the inverse sigmoid function (-log((upper.bound - lower.bound) / (x - lower.bound) - 1)) and its gradient ((upper.bound - lower.bound) / ((lower.bound - x) * (x - upper.bound))).

Value

Returns a list with two elements, each with the same number of elements as x

value

Value of the inverse sigmoid function at x

gradient

Value of the gradient of the inverse sigmoid function at x

Examples

1
2
3
4
5
x <- seq(0.005, 0.995, length.out = 100)
sigmoid.inv.result <- sigmoid.inv(x)

plot(sigmoid.inv.result$value ~ x, type = "l")
plot(sigmoid.inv.result$gradient ~ x, type = "l")

tkmckenzie/ikde documentation built on May 13, 2019, 9:53 p.m.