Model for Classification Problems

Model

Given a classification problem, one of the most straightforward models is logistic regression. But, instead of simply presenting it and using it right away, we are going to build up to it. The rationale behind this approach is twofold. First, it will clarify why this algorithm is called logistic regression if it is used for classification. Second, you will have a clear understanding of what a logit is.

Linear regression

Well, since it is called “logistic regression,” then linear regression is a good starting point for us to build up to it. What would a linear regression model with two features look like?

y=b+w1x1+w2x2+ϵy = b + w_1 x_1 + w_2 x_2 + \epsilon

There is one obvious problem with the model above. Our labels (y) are discrete, meaning they can be only zero or one. We need to change the model slightly to adapt it to our purposes.

Get hands-on with 1200+ tech skills courses.