sigmoid: Sigmoid function

View source: R/LogisticRegression.R

sigmoidR Documentation

Sigmoid function

Description

Sigmoid function, otherwise known as a logistic function

Usage

sigmoid(z)

Arguments

z

input

Details

The sigmoid (or logistic) function,

\sigma(z) = 1 / (1 + e^{-z})

is used in logistic regression to model probabilities, commonly the probability of predicting the positive class, i.e. p(y=1).

Value

output value of the function

Examples

theta = c(1, 0.1)
X = matrix(rnorm(4), 2, 2)
sigmoid(X %*% theta)

dannyjameswilliams/danielR documentation built on Aug. 20, 2023, 3:25 a.m.