Invasion of the Sigmoids

Learn and explore how sigmoids help when linear regression fails.

Overview of sigmoids

Even though linear regression is not a natural fit for binary classification, that does not mean that we have to scrap our linear regression code and start from scratch. Instead, we can adapt our existing algorithm to this new problem using a technique that statisticians call logistic regression.

Let’s start by looking back at y^\hat{y}, the weighted sum of the inputs that we introduced in the lesson: Adding More Dimensions.

y^=x1w1+x2w2+x3w3+...\hat{y} = x_1 * w_1 + x_2 * w_2 + x_3 * w_3 + ...

In linear regression, y^\hat{y} could take any value. Binary classification, however, imposes a tight constraint that y^\hat{y} must not drop below 00 nor raise above 11. Here’s an idea: maybe we can find a function that wraps around the weighted sum and constrains it to the range from ...