"""Don't get confused between Linear Regression & Logistic Regression.""""

Linear Regression:




In above image the dependent variable is on Y-axis (salary) and independent variable is on x-axis(experience). The regression line can be written as

                                 y= a0+a1x+ ε
            Where, a0 and a1 are the coefficients and ε is the error term.

Line of best fit or regression line is found when Sum of the square of residuals ( ∑ (Y-h(X))2) is minimum

Test Error depends on the test data. If the Test data is an exact representation of train data then test error is always zero.

In simple linear regression, there is one independent variable and 2 coefficient
are needed(Y=a+bx+error).

Linear regression provides a continuous output (dependent variable ).

The output for Linear Regression must be a continuous value, such as price, age, etc.




Logistic regression:

Logistic regression is a classification algorithm 

Logistic regression is a predictive analysis.

Logistic regression is used to describe data and to explain the relationship between one dependent binary variable and one or more nominal, ordinal, interval or ratio-level independent variables.

Logistic regression provides discreet output.

Logistic regression is based on the concept of Maximum Likelihood estimation.

According to this estimation, the observed data should be most probable.

In logistic regression, we pass the weighted sum of inputs through an activation function that can map values in between 0 and 1. Such activation function is known as sigmoid function and the curve obtained is called as sigmoid curve or S-curve. 

Logistic regression can be used where the probabilities between two classes is required. Such as whether it will rain today or not, either 0 or 1, true or false etc.

The output of Logistic Regression must be a Categorical value such as 0 or 1, Yes or No, etc.

Its used to predict dependent variable , 0 and 1.












Comments

Popular posts from this blog

"""What does the Normalization & Standardization of Data basically means?"""

"""Machine Learning :Supervised Learning Vs Unsupervised Learning"""