Posts

Logistic Regression - Introduction and Cost Function

Image
INTRODUCTION TO LOGISTIC REGRESSION Difference between Linear & Logistic Regression Fig 1 : Linear Vs Logistic Regression In simple words, as seen in FIG 1 linear regression is used when the our output/predicted variable is continuous variable while logistic regression is used when our output/predicted variable required is binary as . Fig 2 : Plot of Linear Vs Logistic Regression As seen in FIG 2 the data on the 3D-plot on left side is Linear Regression is used best where the data are continuous. While the right side plot is data points that are grouped together and here logistic regression is better, where our outcome required is a binary(1/0, yes/no, true/false) What is a Sigmoid Function ? Logistic regression algorithm also uses a linear equation with independent predictors to predict a value. The predicted value can be anywhere between negative infinity to positive infinity. We need the output of the algorithm to be class variable, i.e 0-n...