Member-only story

Using a Logistic Function in Machine Learning

FS Ndzomga
3 min readNov 12, 2022
Photo by Christopher Gower on Unsplash

In machine learning, a logistic function is used to map a set of input values onto a set of output values. The output values are usually either 0 or 1, which represent the two possible outcomes of a binary classification problem. The logistic function is defined as:

logistic(x) = 1 / (1 + e^(-x))

where x is the input value and e is the natural logarithm. The logistic function has several properties that make it useful for machine learning applications. First, the function is continuous and differentiable, which means that it can be optimized using gradient descent. Second, the output of the function is always between 0 and 1, which makes it easy to interpret as a probability. Finally, the function is monotonic, which means that as the input value increases, so does the output value.

The logistic function can be used for both linear and nonlinear classification problems. For linear problems, the input values are transformed using a linear predictor function before being passed through the logistic function. For example, if we have a two-dimensional data set with input values x1 and x2, we can transform the data using the following predictor function:

z = w1*x1 + w2*x2 + b

where w1 and w2 are weight parameters and b is a bias parameter. The transformed data is then…

--

--

FS Ndzomga
FS Ndzomga

Written by FS Ndzomga

Engineer passionate about data science, startups, philosophy and French literature. Built lycee.ai, discute.co and rimbaud.ai . Open for consulting gigs

No responses yet