How Sigmoid function works in Logistic Regression

I know the Formulae of Sigmoid function, but how this function actually works with Machine learning.

The function basically takes an input whatever might be, there is an infinite range and gives out only 2 outputs either 1 or 0, yes or no!

1 Like

The sigmoid function takes a real valued input with range -Inf to +Inf, and compresses the range to real values between 0.0 and 1.0.

Since it uses the exponential function, the sigmoid() function is related the the probability density of a normally distributed variable.

This means it can be viewed as outputting a probability value between 0 and 1.
These map nicely to the logical values of 0 (for false) and 1 (for true), with a decision threshold at 0.5.

So sigmoid tends to be used in classification models.

2 Likes

@TMosh,
I would say that the sigmoid function is the Cumulative Distribution Function (CDF) of a logistic distribution with zero mean and the scale one. The logistic distribution resembles the normal distribution in shape but has heavier tails, and it has a simpler CDF than the normal.

1 Like

Thanks for the clarification. Statistics is not my best subject.

1 Like