What is the difference between linear regression and logistic regression?

后端 未结 15 1353
一向
一向 2020-12-02 03:32

When we have to predict the value of a categorical (or discrete) outcome we use logistic regression. I believe we use linear regression to also predict the value of an outco

15条回答
  •  眼角桃花
    2020-12-02 04:11

    Regression means continuous variable, Linear means there is linear relation between y and x. Ex= You are trying to predict salary from no of years of experience. So here salary is independent variable(y) and yrs of experience is dependent variable(x). y=b0+ b1*x1 We are trying to find optimum value of constant b0 and b1 which will give us best fitting line for your observation data. It is a equation of line which gives continuous value from x=0 to very large value. This line is called Linear regression model.

    Logistic regression is type of classification technique. Dnt be misled by term regression. Here we predict whether y=0 or 1.

    Here we first need to find p(y=1) (wprobability of y=1) given x from formuale below.

    Probaibility p is related to y by below formuale

    Ex=we can make classification of tumour having more than 50% chance of having cancer as 1 and tumour having less than 50% chance of having cancer as 0.

    Here red point will be predicted as 0 whereas green point will be predicted as 1.

提交回复
热议问题